{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# S&Co Collaborative Filtering Notebook\n",
    "\n",
    "This notebook implements collaborative filtering methods for S&Co data."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Load Libraries and Datasets"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 28,
   "metadata": {},
   "outputs": [],
   "source": [
    "import pandas as pd\n",
    "import numpy as np\n",
    "from sklearn.preprocessing import MinMaxScaler, StandardScaler\n",
    "import altair as alt\n",
    "alt.data_transformers.disable_max_rows()\n",
    "import sys\n",
    "sys.path.append(\"..\")\n",
    "from speculative_reading.load_datasets import get_updated_shxco_data\n",
    "from typing import List, Tuple, Dict\n",
    "\n",
    "from scipy import spatial, stats\n",
    "from scipy.stats import zscore, mode\n",
    "# from scipy.stats import pearsonr"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [],
   "source": [
    "members_df, books_df, borrow_events, events_df = get_updated_shxco_data(get_subscription=False)\n",
    "partial_df = pd.read_csv('../appendix/speculative_reading/data/partial_borrowers_collapsed.csv')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Define Functions"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [],
   "source": [
    "def get_author_title(item: pd.DataFrame) -> Tuple[str, str]:\n",
    "    \"\"\"\n",
    "    Get author and title from a book item\n",
    "\n",
    "    Args:\n",
    "    item: pd.DataFrame: a DataFrame containing a book item\n",
    "\n",
    "    Returns:\n",
    "    Tuple[str, str]: a tuple containing the author and title of the book\n",
    "    \"\"\"\n",
    "    if item.author.isna().any() == False:\n",
    "        author = ' '.join(item.author.str.split(',').values[0][::-1])\n",
    "    else: \n",
    "        author = '(Periodical)'\n",
    "    title = item.title.values[0]\n",
    "    return author, title\n",
    "\n",
    "def get_formatted_titles(sorted_values: pd.DataFrame, numb_of_preds: int, is_table: bool = False) -> List[str]:\n",
    "    \"\"\"\n",
    "    Get a list of formatted titles\n",
    "\n",
    "    Args:\n",
    "    sorted_values: pd.DataFrame: a DataFrame containing the sorted values\n",
    "    numb_of_preds: int: the number of predictions to return\n",
    "    is_table: bool: whether to return the titles in table format\n",
    "\n",
    "    Returns:\n",
    "    List[str]: a list of formatted titles\n",
    "    \"\"\"\n",
    "    titles = []\n",
    "    for i in sorted_values[0:numb_of_preds].item_uri.tolist():\n",
    "        item = books_df[books_df.id == i]\n",
    "        author, title = get_author_title(item)\n",
    "        if is_table:\n",
    "            titles.append(f\"*{title}*,<br>{author}\")\n",
    "        else:\n",
    "            titles.append(f\"{title} by {author}\")\n",
    "    return titles"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {},
   "outputs": [],
   "source": [
    "def euc_distance(prefs: Dict[str, Dict[str, float]], person1: str, person2: str) -> float:\n",
    "    \"\"\"\n",
    "    Calculate the Euclidean distance between two people based on their preferences.\n",
    "    \"\"\"\n",
    "    # Find common items\n",
    "    si = {item: 1 for item in prefs[person1] if item in prefs[person2]}\n",
    "    \n",
    "    # If they have no common items, return 0\n",
    "    if len(si) == 0: \n",
    "        return 0\n",
    "\n",
    "    # Calculate the sum of squares of differences\n",
    "    sum_of_squares = sum(pow(prefs[person1][item] - prefs[person2][item], 2) for item in si)\n",
    "    \n",
    "    # Return the inverse of Euclidean distance to give a higher value to people who are more similar\n",
    "    return 1 / (1 + sum_of_squares)\n",
    "\n",
    "def calculate_rankings(prefs: Dict[str, Dict[str, float]], person: str, other: str, score: float, totals: Dict[str, float], simSums: Dict[str, float], query_books: List[str]) -> List[Tuple[float, str]]:\n",
    "    \"\"\"\n",
    "    Calculate the rankings of books for a person based on the preferences of another person and a similarity score.\n",
    "    \"\"\"\n",
    "    for item in prefs[other]:\n",
    "        # Only consider books that the person hasn't read or rated yet and are in the query books\n",
    "        if item not in prefs[person] or prefs[person][item] == 0:\n",
    "            if item in query_books:\n",
    "                # Calculate the total score for each book\n",
    "                totals.setdefault(item, 0) \n",
    "                totals[item] += prefs[other][item] * score\n",
    "                # Calculate the total similarity for each book\n",
    "                simSums.setdefault(item, 0)\n",
    "                simSums[item] += score\n",
    "\n",
    "    # Calculate the average score for each book\n",
    "    rankings = [(total / simSums[item], item) for item, total in totals.items()]\n",
    "    # Sort the rankings in descending order\n",
    "    rankings.sort()\n",
    "    rankings.reverse()\n",
    "    return rankings\n",
    "\n",
    "def get_predictions(person: str, prefs: Dict[str, Dict[str, float]], weighted: pd.DataFrame,  query_books: List[str]) -> Tuple[List[Tuple[float, str]], List[Tuple[float, str]], List[Tuple[float, str]]]:\n",
    "    \"\"\"\n",
    "    Get book recommendations for a person based on the preferences of all other people.\n",
    "    \"\"\"\n",
    "    totals = {} \n",
    "    simSums = {}\n",
    "\n",
    "    cos_totals = {} \n",
    "    cos_simSums = {}\n",
    "\n",
    "    pear_totals = {} \n",
    "    pear_simSums = {}\n",
    "\n",
    "    for other in prefs:\n",
    "        # Don't compare the person to themselves\n",
    "        if other == person:\n",
    "            continue\n",
    "\n",
    "        # Get the preference vectors for the person and the other person\n",
    "        member_vector = weighted.loc[person]\n",
    "        other_vector = weighted.loc[other]\n",
    "\n",
    "        # Calculate the similarity scores\n",
    "        euc_score = euc_distance(prefs, person, other)\n",
    "        cosine_score = spatial.distance.cosine(member_vector, other_vector)\n",
    "        pearson_score, pearson_p = stats.pearsonr(member_vector, other_vector)\n",
    "\n",
    "        # Ignore people who have a similarity score of 0 with the person\n",
    "        if euc_score <= 0:\n",
    "            continue\n",
    "\n",
    "        # Calculate the rankings based on each similarity score\n",
    "        rankings = calculate_rankings(prefs, person, other, euc_score, totals, simSums, query_books)\n",
    "        cos_rankings = calculate_rankings(prefs, person, other, cosine_score, cos_totals, cos_simSums, query_books)\n",
    "        pear_rankings = calculate_rankings(prefs, person, other, pearson_score, pear_totals, pear_simSums, query_books)\n",
    "\n",
    "    return rankings, cos_rankings, pear_rankings"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {},
   "outputs": [],
   "source": [
    "def create_rankings_dataframe(rankings: List[Tuple[float, str]], score_type: str, n: int) -> pd.DataFrame:\n",
    "    \"\"\"\n",
    "    Create a DataFrame from the rankings of books.\n",
    "    \n",
    "    Parameters:\n",
    "    rankings: A list of tuples where each tuple contains a score and an item URI.\n",
    "    score_type: A string indicating the type of score used in the rankings.\n",
    "    n: The number of top items to include in the DataFrame.\n",
    "\n",
    "    Returns:\n",
    "    A DataFrame with the top n items from the rankings.\n",
    "    \"\"\"\n",
    "    # Create a DataFrame from the top n items in the rankings.\n",
    "    df = pd.DataFrame(rankings[0:n])\n",
    "    # Set the column names.\n",
    "    df.columns = ['score', 'item_uri']\n",
    "    \n",
    "    # Get the formatted titles for the chart and add them to the DataFrame.\n",
    "    chart_titles = get_formatted_titles(df, n, True)\n",
    "    df['formatted_chart_title'] = chart_titles\n",
    "    \n",
    "    # Get the formatted titles for the table and add them to the DataFrame.\n",
    "    table_titles = get_formatted_titles(df, n, False)\n",
    "    df['formatted_table_title'] = table_titles\n",
    "    \n",
    "    # Add the score type to the DataFrame.\n",
    "    df['type'] = score_type\n",
    "    \n",
    "    return df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "metadata": {},
   "outputs": [],
   "source": [
    "def scale_col(df: pd.DataFrame, cols: List[str]) -> pd.DataFrame:\n",
    "    \"\"\"\n",
    "    Scale specified columns in a DataFrame using MinMaxScaler.\n",
    "\n",
    "    Parameters:\n",
    "    df: A pandas DataFrame.\n",
    "    cols: A list of column names to scale.\n",
    "\n",
    "    Returns:\n",
    "    A DataFrame with the scaled columns.\n",
    "    \"\"\"\n",
    "    # For each column in the list of columns...\n",
    "    for col in cols:\n",
    "        # Create a MinMaxScaler.\n",
    "        scaler = MinMaxScaler()\n",
    "        # Fit the scaler to the column and transform the column.\n",
    "        # The 'reshape' function is used to reshape the column to a 2D array, which is required by the 'fit_transform' function.\n",
    "        # The transformed column is added to the DataFrame with the suffix '_scaled'.\n",
    "        df[col + '_scaled'] = scaler.fit_transform(df[col].values.reshape(-1, 1))\n",
    "    # Return the DataFrame with the scaled columns.\n",
    "    return df"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Process Data"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {},
   "outputs": [],
   "source": [
    "# Group the borrow events by member ID and item URI, and count the number of events for each combination.\n",
    "# This can help us understand how many times each member borrowed each item.\n",
    "grouped_borrows = borrow_events[['member_id', 'item_uri']].groupby(['member_id', 'item_uri']).size().reset_index(name='counts')\n",
    "\n",
    "# Pivot the grouped borrow events to create a matrix where the rows are member IDs, the columns are item URIs, and the values are counts.\n",
    "# Fill missing values with 0 and convert the counts to integers.\n",
    "# This creates a user-item matrix that can be used for collaborative filtering.\n",
    "pivoted_borrows = grouped_borrows.pivot(\n",
    "    index='member_id', columns='item_uri', values='counts').fillna(0).astype(int)\n",
    "\n",
    "# Standardize the user-item matrix by subtracting the mean and dividing by the standard deviation.\n",
    "# This can help improve the performance of the collaborative filtering algorithm.\n",
    "scaler = StandardScaler()\n",
    "weighted = scaler.fit_transform(pivoted_borrows)\n",
    "weighted = pd.DataFrame(weighted, index=pivoted_borrows.index, columns=pivoted_borrows.columns)\n",
    "\n",
    "# Define a list of members to query.\n",
    "partial_members = ['hemingway-ernest']\n",
    "\n",
    "# Get the unique member IDs from the grouped borrow events that are in the query members list.\n",
    "query_members = grouped_borrows.loc[grouped_borrows.member_id.isin(partial_members)].member_id.unique().tolist()\n",
    "\n",
    "# Filter the partial_df DataFrame to include only rows where the member ID is in the query members list.\n",
    "partial_df = partial_df[partial_df.member_id.isin(query_members)]\n",
    "\n",
    "# Convert the subscription start and end times to datetime objects.\n",
    "partial_df['subscription_starttime'] = pd.to_datetime(partial_df['subscription_start'])\n",
    "partial_df['subscription_endtime'] = pd.to_datetime(partial_df['subscription_end'])\n",
    "\n",
    "# Create a dictionary where the keys are member IDs and the values are dictionaries of item URIs and counts.\n",
    "# This can be used to quickly look up the count for a specific member and item.\n",
    "member_item_counts = (grouped_borrows.groupby(['member_id'])['item_uri', 'counts'].apply(\n",
    "     lambda x: dict(x.values)).to_dict())"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Processing index: 25\n",
      "Subscription period: 1921-12-28 to 1922-11-08\n",
      "Identified events: 2602\n",
      "Identified books: 666\n",
      "Identified books without those read by member: 660\n",
      "Euclidean: 551, Cosine: 551, Pearson: 551\n",
      "Processing index: 26\n",
      "Subscription period: 1924-03-28 to 1925-03-28\n",
      "Identified events: 6112\n",
      "Identified books: 1292\n",
      "Identified books without those read by member: 1280\n",
      "Euclidean: 1097, Cosine: 1097, Pearson: 1097\n"
     ]
    }
   ],
   "source": [
    "# Set the number of top items to include in the DataFrame.\n",
    "n = 200\n",
    "# Initialize an empty list to store the final DataFrames.\n",
    "final_df = []\n",
    "# Initialize variables to store the previous books and narrow query books.\n",
    "previous_books = None\n",
    "narrow_query_books = None\n",
    "# Set a flag to limit the books to those in circulation.\n",
    "limit_to_circulation = False\n",
    "\n",
    "# For each row in the partial_df DataFrame...\n",
    "for index, row in partial_df.iterrows():\n",
    "    print(f\"Processing index: {index}\")\n",
    "    print(f\"Subscription period: {row.subscription_start} to {row.subscription_end}\")\n",
    "\n",
    "    # Get the events that occurred before the end of the subscription.\n",
    "    circulation_events = events_df[(events_df.start_datetime < row.subscription_endtime) | (events_df.end_datetime < row.subscription_endtime)]\n",
    "    print(f\"Identified events: {len(circulation_events)}\")\n",
    "\n",
    "    # Get the unique books from the events.\n",
    "    query_books = circulation_events[circulation_events.item_uri.notna()].item_uri.unique().tolist()\n",
    "    print(f\"Identified books: {len(query_books)}\")\n",
    "\n",
    "    # Get the unique books that the member has read.\n",
    "    member_book_ids = events_df[(events_df.item_uri.notna()) & (events_df.member_id == row.member_id)].item_uri.unique()\n",
    "    # Remove the books that the member has read from the query books.\n",
    "    query_books = list(set(query_books) - set(member_book_ids))\n",
    "    print(f\"Identified books without those read by member: {len(query_books)}\")\n",
    "\n",
    "    if limit_to_circulation:\n",
    "        if index == 0:\n",
    "            previous_books = query_books\n",
    "        else:\n",
    "            # Remove the books that were read in the previous subscription from the query books.\n",
    "            query_books = list(set(query_books) - set(previous_books))\n",
    "            print(f\"Identified books without those read by member and those read in previous subscription: {len(query_books)}\")\n",
    "\n",
    "    # Get the book recommendations based on Euclidean distance, cosine similarity, and Pearson correlation.\n",
    "    rankings, cos_rankings, pear_rankings = get_predictions(row.member_id, member_item_counts, weighted, query_books)\n",
    "    print(f\"Euclidean: {len(rankings)}, Cosine: {len(cos_rankings)}, Pearson: {len(pear_rankings)}\")\n",
    "\n",
    "    # Create DataFrames from the rankings.\n",
    "    euc_df = create_rankings_dataframe(rankings, 'euclidean', n)\n",
    "    cos_df = create_rankings_dataframe(cos_rankings, 'cosine', n)\n",
    "    pear_df = create_rankings_dataframe(pear_rankings, 'pearson', n)\n",
    "\n",
    "    # Concatenate the DataFrames.\n",
    "    dfs = pd.concat([euc_df, cos_df, pear_df])\n",
    "    # Add the member ID, subscription period, and subscription start and end times to the DataFrame.\n",
    "    dfs['member_id'] = row.member_id\n",
    "    dfs['period'] = row.subscription_start + '/' + row.subscription_end\n",
    "    dfs['subscription_start'] = row.subscription_start\n",
    "    dfs['subscription_end'] = row.subscription_end\n",
    "    # Add the DataFrame to the final list.\n",
    "    final_df.append(dfs)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "63\n"
     ]
    }
   ],
   "source": [
    "# Concatenate all the DataFrames in 'final_df' into a single DataFrame.\n",
    "# This creates a DataFrame with all the book recommendations.\n",
    "final_preds = pd.concat(final_df)\n",
    "\n",
    "# Pivot 'final_preds' to create a matrix where the rows are item URIs, formatted chart titles, formatted table titles, member IDs, periods, subscription start times, and subscription end times, the columns are score types, and the values are scores.\n",
    "# Fill missing values with 0.\n",
    "# This creates a user-item matrix that can be used for collaborative filtering.\n",
    "pivoted_predictions = pd.pivot(final_preds, index=['item_uri', 'formatted_chart_title', 'formatted_table_title', 'member_id', 'period', 'subscription_start', 'subscription_end'], columns='type', values='score').reset_index().fillna(0)\n",
    "\n",
    "# Scale the scores in 'final_preds' within each period and score type.\n",
    "# This can help improve the performance of the collaborative filtering algorithm.\n",
    "final_preds['score_scaled'] = final_preds.groupby(['period', 'type'])['score'].apply(lambda x: (x-min(x))/(max(x)-min(x)))\n",
    "\n",
    "# Define a list of metrics to scale.\n",
    "metrics = ['cosine', 'pearson', 'euclidean']\n",
    "\n",
    "# Scale the metrics in 'pivoted_predictions'.\n",
    "scaled_predictions = scale_col(pivoted_predictions, metrics)\n",
    "\n",
    "# Melt 'scaled_predictions' to create a DataFrame where each row represents a book recommendation, with columns for the item URI, formatted chart title, formatted table title, member ID, period, subscription start time, subscription end time, metric, and score.\n",
    "preds_df = pd.melt(scaled_predictions, id_vars=['item_uri', 'formatted_chart_title', 'formatted_table_title', 'member_id', 'period', 'subscription_start', 'subscription_end'], value_vars=['cosine_scaled', 'pearson_scaled', 'euclidean_scaled'], var_name='metric', value_name='score')\n",
    "\n",
    "# Replace the scaled metric names with the original metric names.\n",
    "preds_df.loc[preds_df.metric == 'cosine_scaled', 'metric'] = 'cosine'\n",
    "preds_df.loc[preds_df.metric == 'pearson_scaled', 'metric'] = 'pearson'\n",
    "preds_df.loc[preds_df.metric == 'euclidean_scaled', 'metric'] = 'euclidean'\n",
    "\n",
    "# Sort 'preds_df' by score in descending order.\n",
    "# This orders the book recommendations by score, with the highest scores first.\n",
    "preds_df = preds_df.sort_values(by=['score'] ,ascending=False)\n",
    "\n",
    "# Get the unique item URIs from the top 100 rows in 'preds_df'.\n",
    "# This gives us the top 100 recommended books.\n",
    "items = preds_df[0:100].item_uri.unique()\n",
    "\n",
    "# Print the number of unique recommended books.\n",
    "print(len(items))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The number of items in the list for the second period is: 23\n"
     ]
    }
   ],
   "source": [
    "# Get the unique periods from 'preds_df'.\n",
    "periods = preds_df.period.unique().tolist()\n",
    "\n",
    "# Set the number of top items to include for each period.\n",
    "n = 23\n",
    "\n",
    "# Initialize an empty list to store the final items for each period.\n",
    "final_items = []\n",
    "\n",
    "# For each period...\n",
    "for index, period in enumerate(periods):\n",
    "    # Initialize an empty list to store the items for this period.\n",
    "    items = []\n",
    "    \n",
    "    # Get the rows from 'preds_df' for this period that are not periodicals, and sort them by score in descending order.\n",
    "    rows = preds_df[(preds_df.period == period) & (preds_df.formatted_chart_title.str.contains('Periodical') == False)].sort_values(by=['score'] ,ascending=False)\n",
    "    \n",
    "    # If this is the first period...\n",
    "    if index == 0:\n",
    "        # While the number of items is less than or equal to n...\n",
    "        while len(items) <= n:\n",
    "            # Get the item URI of the first row.\n",
    "            item = rows.item_uri.iloc[0]\n",
    "            # If the item is not already in the list of items, add it.\n",
    "            if item not in items:\n",
    "                items.append(item)\n",
    "            # Remove the first row from 'rows'.\n",
    "            rows = rows.drop(rows.index[0])\n",
    "        # Add the list of items to 'final_items'.\n",
    "        final_items.append(items)\n",
    "    # If this is not the first period...\n",
    "    else:\n",
    "        # While the number of items is less than or equal to n...\n",
    "        while len(items) <= n:\n",
    "            # Get the item URI of the first row.\n",
    "            item = rows.item_uri.iloc[0]\n",
    "            # If the item is not already in the list of items and it was not in the list of items for the previous period, add it.\n",
    "            if (item not in items) and (item not in final_items[index-1]):\n",
    "                items.append(item)\n",
    "            # Remove the first row from 'rows'.\n",
    "            rows = rows.drop(rows.index[0])\n",
    "        # Limit the list of items to the top n items.\n",
    "        items = items[0:n]\n",
    "        # Add the list of items to 'final_items'.\n",
    "        final_items.append(items)\n",
    "\n",
    "# Print the number of items in the list for the second period.\n",
    "print(f\"The number of items in the list for the second period is: {len(final_items[1])}\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "period\n",
      "1921-12-28/1922-11-08    24\n",
      "1924-03-28/1925-03-28    47\n",
      "Name: item_uri, dtype: int64\n"
     ]
    }
   ],
   "source": [
    "# Concatenate the lists of top items for the first and second periods.\n",
    "# This gives us a list of all the top items across both periods.\n",
    "top_items = final_items[0] + final_items[1] \n",
    "\n",
    "# Filter 'preds_df' to include only rows where the item URI is in the list of top items.\n",
    "# Then, group the rows by period and count the number of unique item URIs for each period.\n",
    "# This gives us the number of unique recommended books for each period.\n",
    "unique_items_per_period = preds_df[preds_df.item_uri.isin(top_items)].groupby(['period'])['item_uri'].nunique()\n",
    "print(unique_items_per_period)\n",
    "\n",
    "top_results = preds_df[preds_df.item_uri.isin(top_items)]\n",
    "# top_results.to_csv('./public_data/memorycf_top_results.csv', index=False)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 26,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "\n",
       "<div id=\"altair-viz-ce1c9222a406458d8cb35753928d7127\"></div>\n",
       "<script type=\"text/javascript\">\n",
       "  var VEGA_DEBUG = (typeof VEGA_DEBUG == \"undefined\") ? {} : VEGA_DEBUG;\n",
       "  (function(spec, embedOpt){\n",
       "    let outputDiv = document.currentScript.previousElementSibling;\n",
       "    if (outputDiv.id !== \"altair-viz-ce1c9222a406458d8cb35753928d7127\") {\n",
       "      outputDiv = document.getElementById(\"altair-viz-ce1c9222a406458d8cb35753928d7127\");\n",
       "    }\n",
       "    const paths = {\n",
       "      \"vega\": \"https://cdn.jsdelivr.net/npm/vega@5?noext\",\n",
       "      \"vega-lib\": \"https://cdn.jsdelivr.net/npm/vega-lib?noext\",\n",
       "      \"vega-lite\": \"https://cdn.jsdelivr.net/npm/vega-lite@5.6.1?noext\",\n",
       "      \"vega-embed\": \"https://cdn.jsdelivr.net/npm/vega-embed@6?noext\",\n",
       "    };\n",
       "\n",
       "    function maybeLoadScript(lib, version) {\n",
       "      var key = `${lib.replace(\"-\", \"\")}_version`;\n",
       "      return (VEGA_DEBUG[key] == version) ?\n",
       "        Promise.resolve(paths[lib]) :\n",
       "        new Promise(function(resolve, reject) {\n",
       "          var s = document.createElement('script');\n",
       "          document.getElementsByTagName(\"head\")[0].appendChild(s);\n",
       "          s.async = true;\n",
       "          s.onload = () => {\n",
       "            VEGA_DEBUG[key] = version;\n",
       "            return resolve(paths[lib]);\n",
       "          };\n",
       "          s.onerror = () => reject(`Error loading script: ${paths[lib]}`);\n",
       "          s.src = paths[lib];\n",
       "        });\n",
       "    }\n",
       "\n",
       "    function showError(err) {\n",
       "      outputDiv.innerHTML = `<div class=\"error\" style=\"color:red;\">${err}</div>`;\n",
       "      throw err;\n",
       "    }\n",
       "\n",
       "    function displayChart(vegaEmbed) {\n",
       "      vegaEmbed(outputDiv, spec, embedOpt)\n",
       "        .catch(err => showError(`Javascript Error: ${err.message}<br>This usually means there's a typo in your chart specification. See the javascript console for the full traceback.`));\n",
       "    }\n",
       "\n",
       "    if(typeof define === \"function\" && define.amd) {\n",
       "      requirejs.config({paths});\n",
       "      require([\"vega-embed\"], displayChart, err => showError(`Error loading script: ${err.message}`));\n",
       "    } else {\n",
       "      maybeLoadScript(\"vega\", \"5\")\n",
       "        .then(() => maybeLoadScript(\"vega-lite\", \"5.6.1\"))\n",
       "        .then(() => maybeLoadScript(\"vega-embed\", \"6\"))\n",
       "        .catch(showError)\n",
       "        .then(() => displayChart(vegaEmbed));\n",
       "    }\n",
       "  })({\"config\": {\"view\": {\"continuousWidth\": 300, \"continuousHeight\": 300}, \"axisY\": {\"labelLimit\": 1000, \"titleAlign\": \"left\", \"titleAngle\": 0, \"titleX\": -100, \"titleY\": -10}}, \"data\": {\"name\": \"data-38d1938851c6c23e9a3f487183fc4bcc\"}, \"mark\": {\"type\": \"point\", \"filled\": true, \"opacity\": 0.8, \"thickness\": 3}, \"encoding\": {\"color\": {\"field\": \"period\", \"legend\": {\"orient\": \"left\", \"title\": \"Subscription Periods With Missing Records\"}, \"type\": \"nominal\"}, \"shape\": {\"field\": \"metric\", \"type\": \"nominal\"}, \"x\": {\"field\": \"score\", \"type\": \"quantitative\"}, \"y\": {\"axis\": {\"orient\": \"right\", \"title\": \"Predicted Book\"}, \"field\": \"formatted_chart_title\", \"sort\": \"-x\", \"type\": \"nominal\"}}, \"title\": \"Top Predictions by Collaborative Filtering Memory-Based Methods\", \"width\": 300, \"$schema\": \"https://vega.github.io/schema/vega-lite/v5.6.1.json\", \"datasets\": {\"data-38d1938851c6c23e9a3f487183fc4bcc\": [{\"item_uri\": \"thompson-francis-thompsons-works\", \"formatted_chart_title\": \"*Works of Francis Thompson*,<br> Francis Thompson\", \"formatted_table_title\": \"Works of Francis Thompson by  Francis Thompson\", \"member_id\": \"hemingway-ernest\", \"period\": \"1924-03-28/1925-03-28\", \"subscription_start\": \"1924-03-28\", \"subscription_end\": \"1925-03-28\", \"metric\": \"euclidean\", \"score\": 1.0}, {\"item_uri\": \"dickens-david-copperfield\", \"formatted_chart_title\": \"*David Copperfield*,<br> Charles Dickens\", \"formatted_table_title\": \"David Copperfield by  Charles Dickens\", \"member_id\": \"hemingway-ernest\", \"period\": \"1924-03-28/1925-03-28\", \"subscription_start\": \"1924-03-28\", \"subscription_end\": \"1925-03-28\", \"metric\": \"pearson\", \"score\": 0.9999999999999999}, {\"item_uri\": \"carritt-theory-beauty\", \"formatted_chart_title\": \"*The Theory of Beauty*,<br> E. F. Carritt\", \"formatted_table_title\": \"The Theory of Beauty by  E. F. Carritt\", \"member_id\": \"hemingway-ernest\", \"period\": \"1924-03-28/1925-03-28\", \"subscription_start\": \"1924-03-28\", \"subscription_end\": \"1925-03-28\", \"metric\": \"euclidean\", \"score\": 0.6428571428571428}, {\"item_uri\": \"thompson-francis-thompsons-works\", \"formatted_chart_title\": \"*Works of Francis Thompson*,<br> Francis Thompson\", \"formatted_table_title\": \"Works of Francis Thompson by  Francis Thompson\", \"member_id\": \"hemingway-ernest\", \"period\": \"1924-03-28/1925-03-28\", \"subscription_start\": \"1924-03-28\", \"subscription_end\": \"1925-03-28\", \"metric\": \"cosine\", \"score\": 0.5697213423070114}, {\"item_uri\": \"swinnerton-george-gissing-critical\", \"formatted_chart_title\": \"*George Gissing: A Critical Study*,<br> Frank Swinnerton\", \"formatted_table_title\": \"George Gissing: A Critical Study by  Frank Swinnerton\", \"member_id\": \"hemingway-ernest\", \"period\": \"1924-03-28/1925-03-28\", \"subscription_start\": \"1924-03-28\", \"subscription_end\": \"1925-03-28\", \"metric\": \"euclidean\", \"score\": 0.42857142857142855}, {\"item_uri\": \"smollett-adventures-roderick-random\", \"formatted_chart_title\": \"*The Adventures of Roderick Random*,<br> Tobias Smollett\", \"formatted_table_title\": \"The Adventures of Roderick Random by  Tobias Smollett\", \"member_id\": \"hemingway-ernest\", \"period\": \"1924-03-28/1925-03-28\", \"subscription_start\": \"1924-03-28\", \"subscription_end\": \"1925-03-28\", \"metric\": \"euclidean\", \"score\": 0.42857142857142855}, {\"item_uri\": \"moore-avowals\", \"formatted_chart_title\": \"*Avowals*,<br> George Moore\", \"formatted_table_title\": \"Avowals by  George Moore\", \"member_id\": \"hemingway-ernest\", \"period\": \"1924-03-28/1925-03-28\", \"subscription_start\": \"1924-03-28\", \"subscription_end\": \"1925-03-28\", \"metric\": \"euclidean\", \"score\": 0.42857142857142855}, {\"item_uri\": \"white-gold\", \"formatted_chart_title\": \"*Gold*,<br> Stewart Edward White\", \"formatted_table_title\": \"Gold by  Stewart Edward White\", \"member_id\": \"hemingway-ernest\", \"period\": \"1924-03-28/1925-03-28\", \"subscription_start\": \"1924-03-28\", \"subscription_end\": \"1925-03-28\", \"metric\": \"euclidean\", \"score\": 0.42857142857142855}, {\"item_uri\": \"shakespeare-shakespeare\", \"formatted_chart_title\": \"*Shakespeare*,<br> William Shakespeare\", \"formatted_table_title\": \"Shakespeare by  William Shakespeare\", \"member_id\": \"hemingway-ernest\", \"period\": \"1924-03-28/1925-03-28\", \"subscription_start\": \"1924-03-28\", \"subscription_end\": \"1925-03-28\", \"metric\": \"euclidean\", \"score\": 0.42857142857142855}, {\"item_uri\": \"shakespeare-shakespeare\", \"formatted_chart_title\": \"*Shakespeare*,<br> William Shakespeare\", \"formatted_table_title\": \"Shakespeare by  William Shakespeare\", \"member_id\": \"hemingway-ernest\", \"period\": \"1921-12-28/1922-11-08\", \"subscription_start\": \"1921-12-28\", \"subscription_end\": \"1922-11-08\", \"metric\": \"euclidean\", \"score\": 0.42857142857142855}, {\"item_uri\": \"corkery-threshold-quiet\", \"formatted_chart_title\": \"*The Threshold of Quiet*,<br> Daniel Corkery\", \"formatted_table_title\": \"The Threshold of Quiet by  Daniel Corkery\", \"member_id\": \"hemingway-ernest\", \"period\": \"1924-03-28/1925-03-28\", \"subscription_start\": \"1924-03-28\", \"subscription_end\": \"1925-03-28\", \"metric\": \"euclidean\", \"score\": 0.42857142857142855}, {\"item_uri\": \"wright-life-walter-pater\", \"formatted_chart_title\": \"*The Life of Walter Pater*,<br> Thomas Wright\", \"formatted_table_title\": \"The Life of Walter Pater by  Thomas Wright\", \"member_id\": \"hemingway-ernest\", \"period\": \"1924-03-28/1925-03-28\", \"subscription_start\": \"1924-03-28\", \"subscription_end\": \"1925-03-28\", \"metric\": \"euclidean\", \"score\": 0.42857142857142855}, {\"item_uri\": \"mencken-book-burlesques\", \"formatted_chart_title\": \"*A Book of Burlesques*,<br> H. L. Mencken\", \"formatted_table_title\": \"A Book of Burlesques by  H. L. Mencken\", \"member_id\": \"hemingway-ernest\", \"period\": \"1924-03-28/1925-03-28\", \"subscription_start\": \"1924-03-28\", \"subscription_end\": \"1925-03-28\", \"metric\": \"euclidean\", \"score\": 0.42857142857142855}, {\"item_uri\": \"galsworthy-villa-rubein\", \"formatted_chart_title\": \"*Villa Rubein*,<br> John Galsworthy\", \"formatted_table_title\": \"Villa Rubein by  John Galsworthy\", \"member_id\": \"hemingway-ernest\", \"period\": \"1924-03-28/1925-03-28\", \"subscription_start\": \"1924-03-28\", \"subscription_end\": \"1925-03-28\", \"metric\": \"euclidean\", \"score\": 0.42857142857142855}, {\"item_uri\": \"wells-washington-hope-peace\", \"formatted_chart_title\": \"*Washington and the Hope of Peace*,<br> H. G. Wells\", \"formatted_table_title\": \"Washington and the Hope of Peace by  H. G. Wells\", \"member_id\": \"hemingway-ernest\", \"period\": \"1921-12-28/1922-11-08\", \"subscription_start\": \"1921-12-28\", \"subscription_end\": \"1922-11-08\", \"metric\": \"euclidean\", \"score\": 0.42857142857142855}, {\"item_uri\": \"jones-samuel-butler\", \"formatted_chart_title\": \"*Samuel Butler*,<br> Henry Festing Jones\", \"formatted_table_title\": \"Samuel Butler by  Henry Festing Jones\", \"member_id\": \"hemingway-ernest\", \"period\": \"1924-03-28/1925-03-28\", \"subscription_start\": \"1924-03-28\", \"subscription_end\": \"1925-03-28\", \"metric\": \"euclidean\", \"score\": 0.42857142857142855}, {\"item_uri\": \"swinnerton-george-gissing-critical\", \"formatted_chart_title\": \"*George Gissing: A Critical Study*,<br> Frank Swinnerton\", \"formatted_table_title\": \"George Gissing: A Critical Study by  Frank Swinnerton\", \"member_id\": \"hemingway-ernest\", \"period\": \"1921-12-28/1922-11-08\", \"subscription_start\": \"1921-12-28\", \"subscription_end\": \"1922-11-08\", \"metric\": \"euclidean\", \"score\": 0.42857142857142855}, {\"item_uri\": \"dostoyevsky-eternal-husband-stories\", \"formatted_chart_title\": \"*The Eternal Husband and Other Stories*,<br> Fyodor Dostoyevsky\", \"formatted_table_title\": \"The Eternal Husband and Other Stories by  Fyodor Dostoyevsky\", \"member_id\": \"hemingway-ernest\", \"period\": \"1924-03-28/1925-03-28\", \"subscription_start\": \"1924-03-28\", \"subscription_end\": \"1925-03-28\", \"metric\": \"euclidean\", \"score\": 0.42857142857142855}, {\"item_uri\": \"jameson-clash\", \"formatted_chart_title\": \"*The Clash*,<br> Storm Jameson\", \"formatted_table_title\": \"The Clash by  Storm Jameson\", \"member_id\": \"hemingway-ernest\", \"period\": \"1921-12-28/1922-11-08\", \"subscription_start\": \"1921-12-28\", \"subscription_end\": \"1922-11-08\", \"metric\": \"euclidean\", \"score\": 0.42857142857142855}, {\"item_uri\": \"wright-life-walter-pater\", \"formatted_chart_title\": \"*The Life of Walter Pater*,<br> Thomas Wright\", \"formatted_table_title\": \"The Life of Walter Pater by  Thomas Wright\", \"member_id\": \"hemingway-ernest\", \"period\": \"1921-12-28/1922-11-08\", \"subscription_start\": \"1921-12-28\", \"subscription_end\": \"1922-11-08\", \"metric\": \"euclidean\", \"score\": 0.42857142857142855}, {\"item_uri\": \"jameson-clash\", \"formatted_chart_title\": \"*The Clash*,<br> Storm Jameson\", \"formatted_table_title\": \"The Clash by  Storm Jameson\", \"member_id\": \"hemingway-ernest\", \"period\": \"1924-03-28/1925-03-28\", \"subscription_start\": \"1924-03-28\", \"subscription_end\": \"1925-03-28\", \"metric\": \"euclidean\", \"score\": 0.42857142857142855}, {\"item_uri\": \"lindsay-daniel-jazz-poems\", \"formatted_chart_title\": \"*The Daniel Jazz and Other Poems*,<br> Vachel Lindsay\", \"formatted_table_title\": \"The Daniel Jazz and Other Poems by  Vachel Lindsay\", \"member_id\": \"hemingway-ernest\", \"period\": \"1924-03-28/1925-03-28\", \"subscription_start\": \"1924-03-28\", \"subscription_end\": \"1925-03-28\", \"metric\": \"euclidean\", \"score\": 0.42857142857142855}, {\"item_uri\": \"lindsay-daniel-jazz-poems\", \"formatted_chart_title\": \"*The Daniel Jazz and Other Poems*,<br> Vachel Lindsay\", \"formatted_table_title\": \"The Daniel Jazz and Other Poems by  Vachel Lindsay\", \"member_id\": \"hemingway-ernest\", \"period\": \"1921-12-28/1922-11-08\", \"subscription_start\": \"1921-12-28\", \"subscription_end\": \"1922-11-08\", \"metric\": \"euclidean\", \"score\": 0.42857142857142855}, {\"item_uri\": \"chesterton-things-considered\", \"formatted_chart_title\": \"*All Things Considered*,<br> G. K. Chesterton\", \"formatted_table_title\": \"All Things Considered by  G. K. Chesterton\", \"member_id\": \"hemingway-ernest\", \"period\": \"1924-03-28/1925-03-28\", \"subscription_start\": \"1924-03-28\", \"subscription_end\": \"1925-03-28\", \"metric\": \"euclidean\", \"score\": 0.42857142857142855}, {\"item_uri\": \"wells-washington-hope-peace\", \"formatted_chart_title\": \"*Washington and the Hope of Peace*,<br> H. G. Wells\", \"formatted_table_title\": \"Washington and the Hope of Peace by  H. G. Wells\", \"member_id\": \"hemingway-ernest\", \"period\": \"1924-03-28/1925-03-28\", \"subscription_start\": \"1924-03-28\", \"subscription_end\": \"1925-03-28\", \"metric\": \"euclidean\", \"score\": 0.42857142857142855}, {\"item_uri\": \"jones-samuel-butler\", \"formatted_chart_title\": \"*Samuel Butler*,<br> Henry Festing Jones\", \"formatted_table_title\": \"Samuel Butler by  Henry Festing Jones\", \"member_id\": \"hemingway-ernest\", \"period\": \"1921-12-28/1922-11-08\", \"subscription_start\": \"1921-12-28\", \"subscription_end\": \"1922-11-08\", \"metric\": \"euclidean\", \"score\": 0.42857142857142855}, {\"item_uri\": \"snaith-van-roon\", \"formatted_chart_title\": \"*The Van Roon*,<br> J. C. Snaith\", \"formatted_table_title\": \"The Van Roon by  J. C. Snaith\", \"member_id\": \"hemingway-ernest\", \"period\": \"1924-03-28/1925-03-28\", \"subscription_start\": \"1924-03-28\", \"subscription_end\": \"1925-03-28\", \"metric\": \"euclidean\", \"score\": 0.42857142857142855}, {\"item_uri\": \"george-bed-roses\", \"formatted_chart_title\": \"*A Bed of Roses*,<br> Walter Lionel George\", \"formatted_table_title\": \"A Bed of Roses by  Walter Lionel George\", \"member_id\": \"hemingway-ernest\", \"period\": \"1924-03-28/1925-03-28\", \"subscription_start\": \"1924-03-28\", \"subscription_end\": \"1925-03-28\", \"metric\": \"euclidean\", \"score\": 0.42857142857142855}, {\"item_uri\": \"thoreau-essays-writings-henry\", \"formatted_chart_title\": \"*Essays and Other Writings of Henry Thoreau*,<br> Henry David Thoreau\", \"formatted_table_title\": \"Essays and Other Writings of Henry Thoreau by  Henry David Thoreau\", \"member_id\": \"hemingway-ernest\", \"period\": \"1924-03-28/1925-03-28\", \"subscription_start\": \"1924-03-28\", \"subscription_end\": \"1925-03-28\", \"metric\": \"euclidean\", \"score\": 0.42857142857142855}, {\"item_uri\": \"abercrombie-thomas-hardy-critical\", \"formatted_chart_title\": \"*Thomas Hardy: A Critical Study*,<br> Lascelles Abercrombie\", \"formatted_table_title\": \"Thomas Hardy: A Critical Study by  Lascelles Abercrombie\", \"member_id\": \"hemingway-ernest\", \"period\": \"1921-12-28/1922-11-08\", \"subscription_start\": \"1921-12-28\", \"subscription_end\": \"1922-11-08\", \"metric\": \"euclidean\", \"score\": 0.42857142857142855}, {\"item_uri\": \"bell-since-cezanne\", \"formatted_chart_title\": \"*Since C\\u00e9zanne*,<br> Clive Bell\", \"formatted_table_title\": \"Since C\\u00e9zanne by  Clive Bell\", \"member_id\": \"hemingway-ernest\", \"period\": \"1921-12-28/1922-11-08\", \"subscription_start\": \"1921-12-28\", \"subscription_end\": \"1922-11-08\", \"metric\": \"euclidean\", \"score\": 0.42857142857142855}, {\"item_uri\": \"austen-lady-susan\", \"formatted_chart_title\": \"*Lady Susan*,<br> Jane Austen\", \"formatted_table_title\": \"Lady Susan by  Jane Austen\", \"member_id\": \"hemingway-ernest\", \"period\": \"1924-03-28/1925-03-28\", \"subscription_start\": \"1924-03-28\", \"subscription_end\": \"1925-03-28\", \"metric\": \"euclidean\", \"score\": 0.42857142857142855}, {\"item_uri\": \"twain-mark-twains-autobiography\", \"formatted_chart_title\": \"*Mark Twain's Autobiography*,<br> Mark Twain\", \"formatted_table_title\": \"Mark Twain's Autobiography by  Mark Twain\", \"member_id\": \"hemingway-ernest\", \"period\": \"1924-03-28/1925-03-28\", \"subscription_start\": \"1924-03-28\", \"subscription_end\": \"1925-03-28\", \"metric\": \"euclidean\", \"score\": 0.42857142857142855}, {\"item_uri\": \"abercrombie-thomas-hardy-critical\", \"formatted_chart_title\": \"*Thomas Hardy: A Critical Study*,<br> Lascelles Abercrombie\", \"formatted_table_title\": \"Thomas Hardy: A Critical Study by  Lascelles Abercrombie\", \"member_id\": \"hemingway-ernest\", \"period\": \"1924-03-28/1925-03-28\", \"subscription_start\": \"1924-03-28\", \"subscription_end\": \"1925-03-28\", \"metric\": \"euclidean\", \"score\": 0.42857142857142855}, {\"item_uri\": \"byron-lord-byrons-correspondence\", \"formatted_chart_title\": \"*Lord Byron's Correspondence*,<br> George Gordon Byron Byron\", \"formatted_table_title\": \"Lord Byron's Correspondence by  George Gordon Byron Byron\", \"member_id\": \"hemingway-ernest\", \"period\": \"1924-03-28/1925-03-28\", \"subscription_start\": \"1924-03-28\", \"subscription_end\": \"1925-03-28\", \"metric\": \"euclidean\", \"score\": 0.42857142857142855}, {\"item_uri\": \"bell-since-cezanne\", \"formatted_chart_title\": \"*Since C\\u00e9zanne*,<br> Clive Bell\", \"formatted_table_title\": \"Since C\\u00e9zanne by  Clive Bell\", \"member_id\": \"hemingway-ernest\", \"period\": \"1924-03-28/1925-03-28\", \"subscription_start\": \"1924-03-28\", \"subscription_end\": \"1925-03-28\", \"metric\": \"euclidean\", \"score\": 0.42857142857142855}, {\"item_uri\": \"carritt-theory-beauty\", \"formatted_chart_title\": \"*The Theory of Beauty*,<br> E. F. Carritt\", \"formatted_table_title\": \"The Theory of Beauty by  E. F. Carritt\", \"member_id\": \"hemingway-ernest\", \"period\": \"1924-03-28/1925-03-28\", \"subscription_start\": \"1924-03-28\", \"subscription_end\": \"1925-03-28\", \"metric\": \"cosine\", \"score\": 0.4281512185584556}, {\"item_uri\": \"carr-philosophy-benedetto-croce\", \"formatted_chart_title\": \"*The Philosophy of Benedetto Croce: The Problem of Art and History*,<br> Herbert Wildon Carr\", \"formatted_table_title\": \"The Philosophy of Benedetto Croce: The Problem of Art and History by  Herbert Wildon Carr\", \"member_id\": \"hemingway-ernest\", \"period\": \"1924-03-28/1925-03-28\", \"subscription_start\": \"1924-03-28\", \"subscription_end\": \"1925-03-28\", \"metric\": \"euclidean\", \"score\": 0.40909090909090906}, {\"item_uri\": \"wharton-house-mirth\", \"formatted_chart_title\": \"*The House of Mirth*,<br> Edith Wharton\", \"formatted_table_title\": \"The House of Mirth by  Edith Wharton\", \"member_id\": \"hemingway-ernest\", \"period\": \"1924-03-28/1925-03-28\", \"subscription_start\": \"1924-03-28\", \"subscription_end\": \"1925-03-28\", \"metric\": \"euclidean\", \"score\": 0.40909090909090906}, {\"item_uri\": \"ingram-true-chatterton-new\", \"formatted_chart_title\": \"*The True Chatterton: A New Study from Original Documents*,<br> John Henry Ingram\", \"formatted_table_title\": \"The True Chatterton: A New Study from Original Documents by  John Henry Ingram\", \"member_id\": \"hemingway-ernest\", \"period\": \"1924-03-28/1925-03-28\", \"subscription_start\": \"1924-03-28\", \"subscription_end\": \"1925-03-28\", \"metric\": \"euclidean\", \"score\": 0.39795918367346933}, {\"item_uri\": \"shaw-unsocial-socialist\", \"formatted_chart_title\": \"*An Unsocial Socialist*,<br> George Bernard Shaw\", \"formatted_table_title\": \"An Unsocial Socialist by  George Bernard Shaw\", \"member_id\": \"hemingway-ernest\", \"period\": \"1924-03-28/1925-03-28\", \"subscription_start\": \"1924-03-28\", \"subscription_end\": \"1925-03-28\", \"metric\": \"euclidean\", \"score\": 0.39285714285714285}, {\"item_uri\": \"shaw-unsocial-socialist\", \"formatted_chart_title\": \"*An Unsocial Socialist*,<br> George Bernard Shaw\", \"formatted_table_title\": \"An Unsocial Socialist by  George Bernard Shaw\", \"member_id\": \"hemingway-ernest\", \"period\": \"1921-12-28/1922-11-08\", \"subscription_start\": \"1921-12-28\", \"subscription_end\": \"1922-11-08\", \"metric\": \"euclidean\", \"score\": 0.39285714285714285}, {\"item_uri\": \"graves-english-poetry-irregular\", \"formatted_chart_title\": \"*On English Poetry: Being an Irregular Approach to the Psychology of This Art, from Evidence Mainly Subjective*,<br> Robert Graves\", \"formatted_table_title\": \"On English Poetry: Being an Irregular Approach to the Psychology of This Art, from Evidence Mainly Subjective by  Robert Graves\", \"member_id\": \"hemingway-ernest\", \"period\": \"1924-03-28/1925-03-28\", \"subscription_start\": \"1924-03-28\", \"subscription_end\": \"1925-03-28\", \"metric\": \"euclidean\", \"score\": 0.39041095890410954}, {\"item_uri\": \"pound-instigations-ezra-pound\", \"formatted_chart_title\": \"*Instigations of Ezra Pound: Together with an Essay on the Chinese Written Character, by Ernest Fenollosa*,<br> Ernest  Ezra;Fenollosa Pound\", \"formatted_table_title\": \"Instigations of Ezra Pound: Together with an Essay on the Chinese Written Character, by Ernest Fenollosa by  Ernest  Ezra;Fenollosa Pound\", \"member_id\": \"hemingway-ernest\", \"period\": \"1921-12-28/1922-11-08\", \"subscription_start\": \"1921-12-28\", \"subscription_end\": \"1922-11-08\", \"metric\": \"euclidean\", \"score\": 0.3857142857142857}, {\"item_uri\": \"pound-instigations-ezra-pound\", \"formatted_chart_title\": \"*Instigations of Ezra Pound: Together with an Essay on the Chinese Written Character, by Ernest Fenollosa*,<br> Ernest  Ezra;Fenollosa Pound\", \"formatted_table_title\": \"Instigations of Ezra Pound: Together with an Essay on the Chinese Written Character, by Ernest Fenollosa by  Ernest  Ezra;Fenollosa Pound\", \"member_id\": \"hemingway-ernest\", \"period\": \"1924-03-28/1925-03-28\", \"subscription_start\": \"1924-03-28\", \"subscription_end\": \"1925-03-28\", \"metric\": \"euclidean\", \"score\": 0.3857142857142857}, {\"item_uri\": \"gogol-overcoat-stories\", \"formatted_chart_title\": \"*The Overcoat and Other Stories*,<br> Nikolai Gogol\", \"formatted_table_title\": \"The Overcoat and Other Stories by  Nikolai Gogol\", \"member_id\": \"hemingway-ernest\", \"period\": \"1924-03-28/1925-03-28\", \"subscription_start\": \"1924-03-28\", \"subscription_end\": \"1925-03-28\", \"metric\": \"euclidean\", \"score\": 0.37912087912087905}, {\"item_uri\": \"swinnerton-casement\", \"formatted_chart_title\": \"*The Casement*,<br> Frank Swinnerton\", \"formatted_table_title\": \"The Casement by  Frank Swinnerton\", \"member_id\": \"hemingway-ernest\", \"period\": \"1924-03-28/1925-03-28\", \"subscription_start\": \"1924-03-28\", \"subscription_end\": \"1925-03-28\", \"metric\": \"euclidean\", \"score\": 0.375}, {\"item_uri\": \"fielding-history-tom-jones\", \"formatted_chart_title\": \"*The History of Tom Jones, a Foundling*,<br> Henry Fielding\", \"formatted_table_title\": \"The History of Tom Jones, a Foundling by  Henry Fielding\", \"member_id\": \"hemingway-ernest\", \"period\": \"1924-03-28/1925-03-28\", \"subscription_start\": \"1924-03-28\", \"subscription_end\": \"1925-03-28\", \"metric\": \"euclidean\", \"score\": 0.37499999999999994}, {\"item_uri\": \"fielding-history-tom-jones\", \"formatted_chart_title\": \"*The History of Tom Jones, a Foundling*,<br> Henry Fielding\", \"formatted_table_title\": \"The History of Tom Jones, a Foundling by  Henry Fielding\", \"member_id\": \"hemingway-ernest\", \"period\": \"1921-12-28/1922-11-08\", \"subscription_start\": \"1921-12-28\", \"subscription_end\": \"1922-11-08\", \"metric\": \"euclidean\", \"score\": 0.37499999999999994}, {\"item_uri\": \"moore-avowals\", \"formatted_chart_title\": \"*Avowals*,<br> George Moore\", \"formatted_table_title\": \"Avowals by  George Moore\", \"member_id\": \"hemingway-ernest\", \"period\": \"1924-03-28/1925-03-28\", \"subscription_start\": \"1924-03-28\", \"subscription_end\": \"1925-03-28\", \"metric\": \"cosine\", \"score\": 0.35421678374404975}, {\"item_uri\": \"mencken-american-language\", \"formatted_chart_title\": \"*The American Language*,<br> H. L. Mencken\", \"formatted_table_title\": \"The American Language by  H. L. Mencken\", \"member_id\": \"hemingway-ernest\", \"period\": \"1924-03-28/1925-03-28\", \"subscription_start\": \"1924-03-28\", \"subscription_end\": \"1925-03-28\", \"metric\": \"euclidean\", \"score\": 0.3482142857142857}, {\"item_uri\": \"mencken-american-language\", \"formatted_chart_title\": \"*The American Language*,<br> H. L. Mencken\", \"formatted_table_title\": \"The American Language by  H. L. Mencken\", \"member_id\": \"hemingway-ernest\", \"period\": \"1921-12-28/1922-11-08\", \"subscription_start\": \"1921-12-28\", \"subscription_end\": \"1922-11-08\", \"metric\": \"euclidean\", \"score\": 0.3482142857142857}, {\"item_uri\": \"stevenson-virginibus-puerisque-papers\", \"formatted_chart_title\": \"*Virginibus Puerisque and Other Papers*,<br> Robert Louis Stevenson\", \"formatted_table_title\": \"Virginibus Puerisque and Other Papers by  Robert Louis Stevenson\", \"member_id\": \"hemingway-ernest\", \"period\": \"1924-03-28/1925-03-28\", \"subscription_start\": \"1924-03-28\", \"subscription_end\": \"1925-03-28\", \"metric\": \"euclidean\", \"score\": 0.3214285714285714}, {\"item_uri\": \"chesterton-heretics\", \"formatted_chart_title\": \"*Heretics*,<br> G. K. Chesterton\", \"formatted_table_title\": \"Heretics by  G. K. Chesterton\", \"member_id\": \"hemingway-ernest\", \"period\": \"1921-12-28/1922-11-08\", \"subscription_start\": \"1921-12-28\", \"subscription_end\": \"1922-11-08\", \"metric\": \"euclidean\", \"score\": 0.3214285714285714}, {\"item_uri\": \"chesterton-heretics\", \"formatted_chart_title\": \"*Heretics*,<br> G. K. Chesterton\", \"formatted_table_title\": \"Heretics by  G. K. Chesterton\", \"member_id\": \"hemingway-ernest\", \"period\": \"1924-03-28/1925-03-28\", \"subscription_start\": \"1924-03-28\", \"subscription_end\": \"1925-03-28\", \"metric\": \"euclidean\", \"score\": 0.3214285714285714}, {\"item_uri\": \"sinnett-growth-soul\", \"formatted_chart_title\": \"*The Growth of the Soul*,<br> A. P. Sinnett\", \"formatted_table_title\": \"The Growth of the Soul by  A. P. Sinnett\", \"member_id\": \"hemingway-ernest\", \"period\": \"1921-12-28/1922-11-08\", \"subscription_start\": \"1921-12-28\", \"subscription_end\": \"1922-11-08\", \"metric\": \"euclidean\", \"score\": 0.3214285714285714}, {\"item_uri\": \"fitzgerald-side-paradise\", \"formatted_chart_title\": \"*This Side of Paradise*,<br> F. Scott Fitzgerald\", \"formatted_table_title\": \"This Side of Paradise by  F. Scott Fitzgerald\", \"member_id\": \"hemingway-ernest\", \"period\": \"1924-03-28/1925-03-28\", \"subscription_start\": \"1924-03-28\", \"subscription_end\": \"1925-03-28\", \"metric\": \"euclidean\", \"score\": 0.3214285714285714}, {\"item_uri\": \"fitzgerald-side-paradise\", \"formatted_chart_title\": \"*This Side of Paradise*,<br> F. Scott Fitzgerald\", \"formatted_table_title\": \"This Side of Paradise by  F. Scott Fitzgerald\", \"member_id\": \"hemingway-ernest\", \"period\": \"1921-12-28/1922-11-08\", \"subscription_start\": \"1921-12-28\", \"subscription_end\": \"1922-11-08\", \"metric\": \"euclidean\", \"score\": 0.3214285714285714}, {\"item_uri\": \"du-bois-darkwater\", \"formatted_chart_title\": \"*Darkwater: Voices from within the Veil*,<br> W. E. B. Du Bois\", \"formatted_table_title\": \"Darkwater: Voices from within the Veil by  W. E. B. Du Bois\", \"member_id\": \"hemingway-ernest\", \"period\": \"1921-12-28/1922-11-08\", \"subscription_start\": \"1921-12-28\", \"subscription_end\": \"1922-11-08\", \"metric\": \"euclidean\", \"score\": 0.3214285714285714}, {\"item_uri\": \"du-bois-darkwater\", \"formatted_chart_title\": \"*Darkwater: Voices from within the Veil*,<br> W. E. B. Du Bois\", \"formatted_table_title\": \"Darkwater: Voices from within the Veil by  W. E. B. Du Bois\", \"member_id\": \"hemingway-ernest\", \"period\": \"1924-03-28/1925-03-28\", \"subscription_start\": \"1924-03-28\", \"subscription_end\": \"1925-03-28\", \"metric\": \"euclidean\", \"score\": 0.3214285714285714}, {\"item_uri\": \"rhys-rabindranath-tagore-biographical\", \"formatted_chart_title\": \"*Rabindranath Tagore: A Biographical Study*,<br> Ernest Rhys\", \"formatted_table_title\": \"Rabindranath Tagore: A Biographical Study by  Ernest Rhys\", \"member_id\": \"hemingway-ernest\", \"period\": \"1921-12-28/1922-11-08\", \"subscription_start\": \"1921-12-28\", \"subscription_end\": \"1922-11-08\", \"metric\": \"euclidean\", \"score\": 0.3214285714285714}, {\"item_uri\": \"stevenson-virginibus-puerisque-papers\", \"formatted_chart_title\": \"*Virginibus Puerisque and Other Papers*,<br> Robert Louis Stevenson\", \"formatted_table_title\": \"Virginibus Puerisque and Other Papers by  Robert Louis Stevenson\", \"member_id\": \"hemingway-ernest\", \"period\": \"1921-12-28/1922-11-08\", \"subscription_start\": \"1921-12-28\", \"subscription_end\": \"1922-11-08\", \"metric\": \"euclidean\", \"score\": 0.3214285714285714}, {\"item_uri\": \"rhys-rabindranath-tagore-biographical\", \"formatted_chart_title\": \"*Rabindranath Tagore: A Biographical Study*,<br> Ernest Rhys\", \"formatted_table_title\": \"Rabindranath Tagore: A Biographical Study by  Ernest Rhys\", \"member_id\": \"hemingway-ernest\", \"period\": \"1924-03-28/1925-03-28\", \"subscription_start\": \"1924-03-28\", \"subscription_end\": \"1925-03-28\", \"metric\": \"euclidean\", \"score\": 0.3214285714285714}, {\"item_uri\": \"sinnett-growth-soul\", \"formatted_chart_title\": \"*The Growth of the Soul*,<br> A. P. Sinnett\", \"formatted_table_title\": \"The Growth of the Soul by  A. P. Sinnett\", \"member_id\": \"hemingway-ernest\", \"period\": \"1924-03-28/1925-03-28\", \"subscription_start\": \"1924-03-28\", \"subscription_end\": \"1925-03-28\", \"metric\": \"euclidean\", \"score\": 0.3214285714285714}, {\"item_uri\": \"eastman-enjoyment-poetry\", \"formatted_chart_title\": \"*Enjoyment of Poetry*,<br> Max Eastman\", \"formatted_table_title\": \"Enjoyment of Poetry by  Max Eastman\", \"member_id\": \"hemingway-ernest\", \"period\": \"1924-03-28/1925-03-28\", \"subscription_start\": \"1924-03-28\", \"subscription_end\": \"1925-03-28\", \"metric\": \"euclidean\", \"score\": 0.31318681318681313}, {\"item_uri\": \"dunsany-fifty-one-tales\", \"formatted_chart_title\": \"*Fifty-One Tales*,<br> Lord Dunsany\", \"formatted_table_title\": \"Fifty-One Tales by  Lord Dunsany\", \"member_id\": \"hemingway-ernest\", \"period\": \"1924-03-28/1925-03-28\", \"subscription_start\": \"1924-03-28\", \"subscription_end\": \"1925-03-28\", \"metric\": \"euclidean\", \"score\": 0.31318681318681313}, {\"item_uri\": \"dunsany-fifty-one-tales\", \"formatted_chart_title\": \"*Fifty-One Tales*,<br> Lord Dunsany\", \"formatted_table_title\": \"Fifty-One Tales by  Lord Dunsany\", \"member_id\": \"hemingway-ernest\", \"period\": \"1921-12-28/1922-11-08\", \"subscription_start\": \"1921-12-28\", \"subscription_end\": \"1922-11-08\", \"metric\": \"euclidean\", \"score\": 0.31318681318681313}, {\"item_uri\": \"eastman-enjoyment-poetry\", \"formatted_chart_title\": \"*Enjoyment of Poetry*,<br> Max Eastman\", \"formatted_table_title\": \"Enjoyment of Poetry by  Max Eastman\", \"member_id\": \"hemingway-ernest\", \"period\": \"1921-12-28/1922-11-08\", \"subscription_start\": \"1921-12-28\", \"subscription_end\": \"1922-11-08\", \"metric\": \"euclidean\", \"score\": 0.31318681318681313}, {\"item_uri\": \"wells-outline-history\", \"formatted_chart_title\": \"*The Outline of History*,<br> H. G. Wells\", \"formatted_table_title\": \"The Outline of History by  H. G. Wells\", \"member_id\": \"hemingway-ernest\", \"period\": \"1924-03-28/1925-03-28\", \"subscription_start\": \"1924-03-28\", \"subscription_end\": \"1925-03-28\", \"metric\": \"euclidean\", \"score\": 0.3}, {\"item_uri\": \"wells-outline-history\", \"formatted_chart_title\": \"*The Outline of History*,<br> H. G. Wells\", \"formatted_table_title\": \"The Outline of History by  H. G. Wells\", \"member_id\": \"hemingway-ernest\", \"period\": \"1921-12-28/1922-11-08\", \"subscription_start\": \"1921-12-28\", \"subscription_end\": \"1922-11-08\", \"metric\": \"euclidean\", \"score\": 0.3}, {\"item_uri\": \"green-short-history-english\", \"formatted_chart_title\": \"*A Short History of the English People*,<br> John Richard Green\", \"formatted_table_title\": \"A Short History of the English People by  John Richard Green\", \"member_id\": \"hemingway-ernest\", \"period\": \"1921-12-28/1922-11-08\", \"subscription_start\": \"1921-12-28\", \"subscription_end\": \"1922-11-08\", \"metric\": \"euclidean\", \"score\": 0.3}, {\"item_uri\": \"green-short-history-english\", \"formatted_chart_title\": \"*A Short History of the English People*,<br> John Richard Green\", \"formatted_table_title\": \"A Short History of the English People by  John Richard Green\", \"member_id\": \"hemingway-ernest\", \"period\": \"1924-03-28/1925-03-28\", \"subscription_start\": \"1924-03-28\", \"subscription_end\": \"1925-03-28\", \"metric\": \"euclidean\", \"score\": 0.3}, {\"item_uri\": \"freud-totem-taboo\", \"formatted_chart_title\": \"*Totem and Taboo*,<br> Sigmund Freud\", \"formatted_table_title\": \"Totem and Taboo by  Sigmund Freud\", \"member_id\": \"hemingway-ernest\", \"period\": \"1921-12-28/1922-11-08\", \"subscription_start\": \"1921-12-28\", \"subscription_end\": \"1922-11-08\", \"metric\": \"euclidean\", \"score\": 0.3}, {\"item_uri\": \"freud-totem-taboo\", \"formatted_chart_title\": \"*Totem and Taboo*,<br> Sigmund Freud\", \"formatted_table_title\": \"Totem and Taboo by  Sigmund Freud\", \"member_id\": \"hemingway-ernest\", \"period\": \"1924-03-28/1925-03-28\", \"subscription_start\": \"1924-03-28\", \"subscription_end\": \"1925-03-28\", \"metric\": \"euclidean\", \"score\": 0.3}, {\"item_uri\": \"wright-life-walter-pater\", \"formatted_chart_title\": \"*The Life of Walter Pater*,<br> Thomas Wright\", \"formatted_table_title\": \"The Life of Walter Pater by  Thomas Wright\", \"member_id\": \"hemingway-ernest\", \"period\": \"1921-12-28/1922-11-08\", \"subscription_start\": \"1921-12-28\", \"subscription_end\": \"1922-11-08\", \"metric\": \"cosine\", \"score\": 0.2854341457056371}, {\"item_uri\": \"mencken-book-burlesques\", \"formatted_chart_title\": \"*A Book of Burlesques*,<br> H. L. Mencken\", \"formatted_table_title\": \"A Book of Burlesques by  H. L. Mencken\", \"member_id\": \"hemingway-ernest\", \"period\": \"1924-03-28/1925-03-28\", \"subscription_start\": \"1924-03-28\", \"subscription_end\": \"1925-03-28\", \"metric\": \"cosine\", \"score\": 0.2854341457056371}, {\"item_uri\": \"swinnerton-george-gissing-critical\", \"formatted_chart_title\": \"*George Gissing: A Critical Study*,<br> Frank Swinnerton\", \"formatted_table_title\": \"George Gissing: A Critical Study by  Frank Swinnerton\", \"member_id\": \"hemingway-ernest\", \"period\": \"1924-03-28/1925-03-28\", \"subscription_start\": \"1924-03-28\", \"subscription_end\": \"1925-03-28\", \"metric\": \"cosine\", \"score\": 0.2854341457056371}, {\"item_uri\": \"wells-washington-hope-peace\", \"formatted_chart_title\": \"*Washington and the Hope of Peace*,<br> H. G. Wells\", \"formatted_table_title\": \"Washington and the Hope of Peace by  H. G. Wells\", \"member_id\": \"hemingway-ernest\", \"period\": \"1921-12-28/1922-11-08\", \"subscription_start\": \"1921-12-28\", \"subscription_end\": \"1922-11-08\", \"metric\": \"cosine\", \"score\": 0.2854341457056371}, {\"item_uri\": \"wells-washington-hope-peace\", \"formatted_chart_title\": \"*Washington and the Hope of Peace*,<br> H. G. Wells\", \"formatted_table_title\": \"Washington and the Hope of Peace by  H. G. Wells\", \"member_id\": \"hemingway-ernest\", \"period\": \"1924-03-28/1925-03-28\", \"subscription_start\": \"1924-03-28\", \"subscription_end\": \"1925-03-28\", \"metric\": \"cosine\", \"score\": 0.2854341457056371}, {\"item_uri\": \"wright-life-walter-pater\", \"formatted_chart_title\": \"*The Life of Walter Pater*,<br> Thomas Wright\", \"formatted_table_title\": \"The Life of Walter Pater by  Thomas Wright\", \"member_id\": \"hemingway-ernest\", \"period\": \"1924-03-28/1925-03-28\", \"subscription_start\": \"1924-03-28\", \"subscription_end\": \"1925-03-28\", \"metric\": \"cosine\", \"score\": 0.2854341457056371}, {\"item_uri\": \"george-bed-roses\", \"formatted_chart_title\": \"*A Bed of Roses*,<br> Walter Lionel George\", \"formatted_table_title\": \"A Bed of Roses by  Walter Lionel George\", \"member_id\": \"hemingway-ernest\", \"period\": \"1924-03-28/1925-03-28\", \"subscription_start\": \"1924-03-28\", \"subscription_end\": \"1925-03-28\", \"metric\": \"cosine\", \"score\": 0.2854341457056371}, {\"item_uri\": \"galsworthy-villa-rubein\", \"formatted_chart_title\": \"*Villa Rubein*,<br> John Galsworthy\", \"formatted_table_title\": \"Villa Rubein by  John Galsworthy\", \"member_id\": \"hemingway-ernest\", \"period\": \"1924-03-28/1925-03-28\", \"subscription_start\": \"1924-03-28\", \"subscription_end\": \"1925-03-28\", \"metric\": \"cosine\", \"score\": 0.2854341457056371}, {\"item_uri\": \"jones-samuel-butler\", \"formatted_chart_title\": \"*Samuel Butler*,<br> Henry Festing Jones\", \"formatted_table_title\": \"Samuel Butler by  Henry Festing Jones\", \"member_id\": \"hemingway-ernest\", \"period\": \"1924-03-28/1925-03-28\", \"subscription_start\": \"1924-03-28\", \"subscription_end\": \"1925-03-28\", \"metric\": \"cosine\", \"score\": 0.2854341457056371}, {\"item_uri\": \"snaith-van-roon\", \"formatted_chart_title\": \"*The Van Roon*,<br> J. C. Snaith\", \"formatted_table_title\": \"The Van Roon by  J. C. Snaith\", \"member_id\": \"hemingway-ernest\", \"period\": \"1924-03-28/1925-03-28\", \"subscription_start\": \"1924-03-28\", \"subscription_end\": \"1925-03-28\", \"metric\": \"cosine\", \"score\": 0.2854341457056371}, {\"item_uri\": \"dostoyevsky-eternal-husband-stories\", \"formatted_chart_title\": \"*The Eternal Husband and Other Stories*,<br> Fyodor Dostoyevsky\", \"formatted_table_title\": \"The Eternal Husband and Other Stories by  Fyodor Dostoyevsky\", \"member_id\": \"hemingway-ernest\", \"period\": \"1924-03-28/1925-03-28\", \"subscription_start\": \"1924-03-28\", \"subscription_end\": \"1925-03-28\", \"metric\": \"cosine\", \"score\": 0.2854341457056371}, {\"item_uri\": \"swinnerton-george-gissing-critical\", \"formatted_chart_title\": \"*George Gissing: A Critical Study*,<br> Frank Swinnerton\", \"formatted_table_title\": \"George Gissing: A Critical Study by  Frank Swinnerton\", \"member_id\": \"hemingway-ernest\", \"period\": \"1921-12-28/1922-11-08\", \"subscription_start\": \"1921-12-28\", \"subscription_end\": \"1922-11-08\", \"metric\": \"cosine\", \"score\": 0.2854341457056371}, {\"item_uri\": \"smollett-adventures-roderick-random\", \"formatted_chart_title\": \"*The Adventures of Roderick Random*,<br> Tobias Smollett\", \"formatted_table_title\": \"The Adventures of Roderick Random by  Tobias Smollett\", \"member_id\": \"hemingway-ernest\", \"period\": \"1924-03-28/1925-03-28\", \"subscription_start\": \"1924-03-28\", \"subscription_end\": \"1925-03-28\", \"metric\": \"cosine\", \"score\": 0.2854341457056371}, {\"item_uri\": \"corkery-threshold-quiet\", \"formatted_chart_title\": \"*The Threshold of Quiet*,<br> Daniel Corkery\", \"formatted_table_title\": \"The Threshold of Quiet by  Daniel Corkery\", \"member_id\": \"hemingway-ernest\", \"period\": \"1924-03-28/1925-03-28\", \"subscription_start\": \"1924-03-28\", \"subscription_end\": \"1925-03-28\", \"metric\": \"cosine\", \"score\": 0.2854341457056371}, {\"item_uri\": \"chesterton-things-considered\", \"formatted_chart_title\": \"*All Things Considered*,<br> G. K. Chesterton\", \"formatted_table_title\": \"All Things Considered by  G. K. Chesterton\", \"member_id\": \"hemingway-ernest\", \"period\": \"1924-03-28/1925-03-28\", \"subscription_start\": \"1924-03-28\", \"subscription_end\": \"1925-03-28\", \"metric\": \"cosine\", \"score\": 0.2854341457056371}, {\"item_uri\": \"byron-lord-byrons-correspondence\", \"formatted_chart_title\": \"*Lord Byron's Correspondence*,<br> George Gordon Byron Byron\", \"formatted_table_title\": \"Lord Byron's Correspondence by  George Gordon Byron Byron\", \"member_id\": \"hemingway-ernest\", \"period\": \"1924-03-28/1925-03-28\", \"subscription_start\": \"1924-03-28\", \"subscription_end\": \"1925-03-28\", \"metric\": \"cosine\", \"score\": 0.2854341457056371}, {\"item_uri\": \"twain-mark-twains-autobiography\", \"formatted_chart_title\": \"*Mark Twain's Autobiography*,<br> Mark Twain\", \"formatted_table_title\": \"Mark Twain's Autobiography by  Mark Twain\", \"member_id\": \"hemingway-ernest\", \"period\": \"1924-03-28/1925-03-28\", \"subscription_start\": \"1924-03-28\", \"subscription_end\": \"1925-03-28\", \"metric\": \"cosine\", \"score\": 0.2854341457056371}, {\"item_uri\": \"bell-since-cezanne\", \"formatted_chart_title\": \"*Since C\\u00e9zanne*,<br> Clive Bell\", \"formatted_table_title\": \"Since C\\u00e9zanne by  Clive Bell\", \"member_id\": \"hemingway-ernest\", \"period\": \"1924-03-28/1925-03-28\", \"subscription_start\": \"1924-03-28\", \"subscription_end\": \"1925-03-28\", \"metric\": \"cosine\", \"score\": 0.2854341457056371}, {\"item_uri\": \"bell-since-cezanne\", \"formatted_chart_title\": \"*Since C\\u00e9zanne*,<br> Clive Bell\", \"formatted_table_title\": \"Since C\\u00e9zanne by  Clive Bell\", \"member_id\": \"hemingway-ernest\", \"period\": \"1921-12-28/1922-11-08\", \"subscription_start\": \"1921-12-28\", \"subscription_end\": \"1922-11-08\", \"metric\": \"cosine\", \"score\": 0.2854341457056371}, {\"item_uri\": \"austen-lady-susan\", \"formatted_chart_title\": \"*Lady Susan*,<br> Jane Austen\", \"formatted_table_title\": \"Lady Susan by  Jane Austen\", \"member_id\": \"hemingway-ernest\", \"period\": \"1924-03-28/1925-03-28\", \"subscription_start\": \"1924-03-28\", \"subscription_end\": \"1925-03-28\", \"metric\": \"cosine\", \"score\": 0.2854341457056371}, {\"item_uri\": \"abercrombie-thomas-hardy-critical\", \"formatted_chart_title\": \"*Thomas Hardy: A Critical Study*,<br> Lascelles Abercrombie\", \"formatted_table_title\": \"Thomas Hardy: A Critical Study by  Lascelles Abercrombie\", \"member_id\": \"hemingway-ernest\", \"period\": \"1924-03-28/1925-03-28\", \"subscription_start\": \"1924-03-28\", \"subscription_end\": \"1925-03-28\", \"metric\": \"cosine\", \"score\": 0.2854341457056371}, {\"item_uri\": \"abercrombie-thomas-hardy-critical\", \"formatted_chart_title\": \"*Thomas Hardy: A Critical Study*,<br> Lascelles Abercrombie\", \"formatted_table_title\": \"Thomas Hardy: A Critical Study by  Lascelles Abercrombie\", \"member_id\": \"hemingway-ernest\", \"period\": \"1921-12-28/1922-11-08\", \"subscription_start\": \"1921-12-28\", \"subscription_end\": \"1922-11-08\", \"metric\": \"cosine\", \"score\": 0.2854341457056371}, {\"item_uri\": \"thoreau-essays-writings-henry\", \"formatted_chart_title\": \"*Essays and Other Writings of Henry Thoreau*,<br> Henry David Thoreau\", \"formatted_table_title\": \"Essays and Other Writings of Henry Thoreau by  Henry David Thoreau\", \"member_id\": \"hemingway-ernest\", \"period\": \"1924-03-28/1925-03-28\", \"subscription_start\": \"1924-03-28\", \"subscription_end\": \"1925-03-28\", \"metric\": \"cosine\", \"score\": 0.2854341457056371}, {\"item_uri\": \"jones-samuel-butler\", \"formatted_chart_title\": \"*Samuel Butler*,<br> Henry Festing Jones\", \"formatted_table_title\": \"Samuel Butler by  Henry Festing Jones\", \"member_id\": \"hemingway-ernest\", \"period\": \"1921-12-28/1922-11-08\", \"subscription_start\": \"1921-12-28\", \"subscription_end\": \"1922-11-08\", \"metric\": \"cosine\", \"score\": 0.2854341457056371}, {\"item_uri\": \"jameson-clash\", \"formatted_chart_title\": \"*The Clash*,<br> Storm Jameson\", \"formatted_table_title\": \"The Clash by  Storm Jameson\", \"member_id\": \"hemingway-ernest\", \"period\": \"1921-12-28/1922-11-08\", \"subscription_start\": \"1921-12-28\", \"subscription_end\": \"1922-11-08\", \"metric\": \"cosine\", \"score\": 0.2854341457056371}, {\"item_uri\": \"lindsay-daniel-jazz-poems\", \"formatted_chart_title\": \"*The Daniel Jazz and Other Poems*,<br> Vachel Lindsay\", \"formatted_table_title\": \"The Daniel Jazz and Other Poems by  Vachel Lindsay\", \"member_id\": \"hemingway-ernest\", \"period\": \"1924-03-28/1925-03-28\", \"subscription_start\": \"1924-03-28\", \"subscription_end\": \"1925-03-28\", \"metric\": \"cosine\", \"score\": 0.2854341457056371}, {\"item_uri\": \"lindsay-daniel-jazz-poems\", \"formatted_chart_title\": \"*The Daniel Jazz and Other Poems*,<br> Vachel Lindsay\", \"formatted_table_title\": \"The Daniel Jazz and Other Poems by  Vachel Lindsay\", \"member_id\": \"hemingway-ernest\", \"period\": \"1921-12-28/1922-11-08\", \"subscription_start\": \"1921-12-28\", \"subscription_end\": \"1922-11-08\", \"metric\": \"cosine\", \"score\": 0.2854341457056371}, {\"item_uri\": \"white-gold\", \"formatted_chart_title\": \"*Gold*,<br> Stewart Edward White\", \"formatted_table_title\": \"Gold by  Stewart Edward White\", \"member_id\": \"hemingway-ernest\", \"period\": \"1924-03-28/1925-03-28\", \"subscription_start\": \"1924-03-28\", \"subscription_end\": \"1925-03-28\", \"metric\": \"cosine\", \"score\": 0.2854341457056371}, {\"item_uri\": \"jameson-clash\", \"formatted_chart_title\": \"*The Clash*,<br> Storm Jameson\", \"formatted_table_title\": \"The Clash by  Storm Jameson\", \"member_id\": \"hemingway-ernest\", \"period\": \"1924-03-28/1925-03-28\", \"subscription_start\": \"1924-03-28\", \"subscription_end\": \"1925-03-28\", \"metric\": \"cosine\", \"score\": 0.2854341457056371}, {\"item_uri\": \"shakespeare-shakespeare\", \"formatted_chart_title\": \"*Shakespeare*,<br> William Shakespeare\", \"formatted_table_title\": \"Shakespeare by  William Shakespeare\", \"member_id\": \"hemingway-ernest\", \"period\": \"1924-03-28/1925-03-28\", \"subscription_start\": \"1924-03-28\", \"subscription_end\": \"1925-03-28\", \"metric\": \"cosine\", \"score\": 0.2853047064158075}, {\"item_uri\": \"shakespeare-shakespeare\", \"formatted_chart_title\": \"*Shakespeare*,<br> William Shakespeare\", \"formatted_table_title\": \"Shakespeare by  William Shakespeare\", \"member_id\": \"hemingway-ernest\", \"period\": \"1921-12-28/1922-11-08\", \"subscription_start\": \"1921-12-28\", \"subscription_end\": \"1922-11-08\", \"metric\": \"cosine\", \"score\": 0.2853047064158075}, {\"item_uri\": \"dickens-david-copperfield\", \"formatted_chart_title\": \"*David Copperfield*,<br> Charles Dickens\", \"formatted_table_title\": \"David Copperfield by  Charles Dickens\", \"member_id\": \"hemingway-ernest\", \"period\": \"1924-03-28/1925-03-28\", \"subscription_start\": \"1924-03-28\", \"subscription_end\": \"1925-03-28\", \"metric\": \"euclidean\", \"score\": 0.26785714285714285}, {\"item_uri\": \"pound-instigations-ezra-pound\", \"formatted_chart_title\": \"*Instigations of Ezra Pound: Together with an Essay on the Chinese Written Character, by Ernest Fenollosa*,<br> Ernest  Ezra;Fenollosa Pound\", \"formatted_table_title\": \"Instigations of Ezra Pound: Together with an Essay on the Chinese Written Character, by Ernest Fenollosa by  Ernest  Ezra;Fenollosa Pound\", \"member_id\": \"hemingway-ernest\", \"period\": \"1924-03-28/1925-03-28\", \"subscription_start\": \"1924-03-28\", \"subscription_end\": \"1925-03-28\", \"metric\": \"cosine\", \"score\": 0.23866406654060593}, {\"item_uri\": \"pound-instigations-ezra-pound\", \"formatted_chart_title\": \"*Instigations of Ezra Pound: Together with an Essay on the Chinese Written Character, by Ernest Fenollosa*,<br> Ernest  Ezra;Fenollosa Pound\", \"formatted_table_title\": \"Instigations of Ezra Pound: Together with an Essay on the Chinese Written Character, by Ernest Fenollosa by  Ernest  Ezra;Fenollosa Pound\", \"member_id\": \"hemingway-ernest\", \"period\": \"1921-12-28/1922-11-08\", \"subscription_start\": \"1921-12-28\", \"subscription_end\": \"1922-11-08\", \"metric\": \"cosine\", \"score\": 0.23866406654060593}, {\"item_uri\": \"freud-totem-taboo\", \"formatted_chart_title\": \"*Totem and Taboo*,<br> Sigmund Freud\", \"formatted_table_title\": \"Totem and Taboo by  Sigmund Freud\", \"member_id\": \"hemingway-ernest\", \"period\": \"1921-12-28/1922-11-08\", \"subscription_start\": \"1921-12-28\", \"subscription_end\": \"1922-11-08\", \"metric\": \"cosine\", \"score\": 0.2368215664723092}, {\"item_uri\": \"freud-totem-taboo\", \"formatted_chart_title\": \"*Totem and Taboo*,<br> Sigmund Freud\", \"formatted_table_title\": \"Totem and Taboo by  Sigmund Freud\", \"member_id\": \"hemingway-ernest\", \"period\": \"1924-03-28/1925-03-28\", \"subscription_start\": \"1924-03-28\", \"subscription_end\": \"1925-03-28\", \"metric\": \"cosine\", \"score\": 0.2368215664723092}, {\"item_uri\": \"fielding-history-tom-jones\", \"formatted_chart_title\": \"*The History of Tom Jones, a Foundling*,<br> Henry Fielding\", \"formatted_table_title\": \"The History of Tom Jones, a Foundling by  Henry Fielding\", \"member_id\": \"hemingway-ernest\", \"period\": \"1921-12-28/1922-11-08\", \"subscription_start\": \"1921-12-28\", \"subscription_end\": \"1922-11-08\", \"metric\": \"cosine\", \"score\": 0.22842480454491745}, {\"item_uri\": \"fielding-history-tom-jones\", \"formatted_chart_title\": \"*The History of Tom Jones, a Foundling*,<br> Henry Fielding\", \"formatted_table_title\": \"The History of Tom Jones, a Foundling by  Henry Fielding\", \"member_id\": \"hemingway-ernest\", \"period\": \"1924-03-28/1925-03-28\", \"subscription_start\": \"1924-03-28\", \"subscription_end\": \"1925-03-28\", \"metric\": \"cosine\", \"score\": 0.22842480454491745}, {\"item_uri\": \"shaw-unsocial-socialist\", \"formatted_chart_title\": \"*An Unsocial Socialist*,<br> George Bernard Shaw\", \"formatted_table_title\": \"An Unsocial Socialist by  George Bernard Shaw\", \"member_id\": \"hemingway-ernest\", \"period\": \"1924-03-28/1925-03-28\", \"subscription_start\": \"1924-03-28\", \"subscription_end\": \"1925-03-28\", \"metric\": \"cosine\", \"score\": 0.2161122415208401}, {\"item_uri\": \"shaw-unsocial-socialist\", \"formatted_chart_title\": \"*An Unsocial Socialist*,<br> George Bernard Shaw\", \"formatted_table_title\": \"An Unsocial Socialist by  George Bernard Shaw\", \"member_id\": \"hemingway-ernest\", \"period\": \"1921-12-28/1922-11-08\", \"subscription_start\": \"1921-12-28\", \"subscription_end\": \"1922-11-08\", \"metric\": \"cosine\", \"score\": 0.2161122415208401}, {\"item_uri\": \"wharton-house-mirth\", \"formatted_chart_title\": \"*The House of Mirth*,<br> Edith Wharton\", \"formatted_table_title\": \"The House of Mirth by  Edith Wharton\", \"member_id\": \"hemingway-ernest\", \"period\": \"1924-03-28/1925-03-28\", \"subscription_start\": \"1924-03-28\", \"subscription_end\": \"1925-03-28\", \"metric\": \"cosine\", \"score\": 0.21487140554268616}, {\"item_uri\": \"rhys-rabindranath-tagore-biographical\", \"formatted_chart_title\": \"*Rabindranath Tagore: A Biographical Study*,<br> Ernest Rhys\", \"formatted_table_title\": \"Rabindranath Tagore: A Biographical Study by  Ernest Rhys\", \"member_id\": \"hemingway-ernest\", \"period\": \"1924-03-28/1925-03-28\", \"subscription_start\": \"1924-03-28\", \"subscription_end\": \"1925-03-28\", \"metric\": \"cosine\", \"score\": 0.2142319535960239}, {\"item_uri\": \"rhys-rabindranath-tagore-biographical\", \"formatted_chart_title\": \"*Rabindranath Tagore: A Biographical Study*,<br> Ernest Rhys\", \"formatted_table_title\": \"Rabindranath Tagore: A Biographical Study by  Ernest Rhys\", \"member_id\": \"hemingway-ernest\", \"period\": \"1921-12-28/1922-11-08\", \"subscription_start\": \"1921-12-28\", \"subscription_end\": \"1922-11-08\", \"metric\": \"cosine\", \"score\": 0.2142319535960239}, {\"item_uri\": \"fitzgerald-side-paradise\", \"formatted_chart_title\": \"*This Side of Paradise*,<br> F. Scott Fitzgerald\", \"formatted_table_title\": \"This Side of Paradise by  F. Scott Fitzgerald\", \"member_id\": \"hemingway-ernest\", \"period\": \"1924-03-28/1925-03-28\", \"subscription_start\": \"1924-03-28\", \"subscription_end\": \"1925-03-28\", \"metric\": \"cosine\", \"score\": 0.2140438385542125}, {\"item_uri\": \"fitzgerald-side-paradise\", \"formatted_chart_title\": \"*This Side of Paradise*,<br> F. Scott Fitzgerald\", \"formatted_table_title\": \"This Side of Paradise by  F. Scott Fitzgerald\", \"member_id\": \"hemingway-ernest\", \"period\": \"1921-12-28/1922-11-08\", \"subscription_start\": \"1921-12-28\", \"subscription_end\": \"1922-11-08\", \"metric\": \"cosine\", \"score\": 0.2140438385542125}, {\"item_uri\": \"carr-philosophy-benedetto-croce\", \"formatted_chart_title\": \"*The Philosophy of Benedetto Croce: The Problem of Art and History*,<br> Herbert Wildon Carr\", \"formatted_table_title\": \"The Philosophy of Benedetto Croce: The Problem of Art and History by  Herbert Wildon Carr\", \"member_id\": \"hemingway-ernest\", \"period\": \"1924-03-28/1925-03-28\", \"subscription_start\": \"1924-03-28\", \"subscription_end\": \"1925-03-28\", \"metric\": \"cosine\", \"score\": 0.21404135539492644}, {\"item_uri\": \"du-bois-darkwater\", \"formatted_chart_title\": \"*Darkwater: Voices from within the Veil*,<br> W. E. B. Du Bois\", \"formatted_table_title\": \"Darkwater: Voices from within the Veil by  W. E. B. Du Bois\", \"member_id\": \"hemingway-ernest\", \"period\": \"1924-03-28/1925-03-28\", \"subscription_start\": \"1924-03-28\", \"subscription_end\": \"1925-03-28\", \"metric\": \"cosine\", \"score\": 0.2139894768283807}, {\"item_uri\": \"du-bois-darkwater\", \"formatted_chart_title\": \"*Darkwater: Voices from within the Veil*,<br> W. E. B. Du Bois\", \"formatted_table_title\": \"Darkwater: Voices from within the Veil by  W. E. B. Du Bois\", \"member_id\": \"hemingway-ernest\", \"period\": \"1921-12-28/1922-11-08\", \"subscription_start\": \"1921-12-28\", \"subscription_end\": \"1922-11-08\", \"metric\": \"cosine\", \"score\": 0.2139894768283807}, {\"item_uri\": \"stevenson-virginibus-puerisque-papers\", \"formatted_chart_title\": \"*Virginibus Puerisque and Other Papers*,<br> Robert Louis Stevenson\", \"formatted_table_title\": \"Virginibus Puerisque and Other Papers by  Robert Louis Stevenson\", \"member_id\": \"hemingway-ernest\", \"period\": \"1921-12-28/1922-11-08\", \"subscription_start\": \"1921-12-28\", \"subscription_end\": \"1922-11-08\", \"metric\": \"cosine\", \"score\": 0.213894987514974}, {\"item_uri\": \"stevenson-virginibus-puerisque-papers\", \"formatted_chart_title\": \"*Virginibus Puerisque and Other Papers*,<br> Robert Louis Stevenson\", \"formatted_table_title\": \"Virginibus Puerisque and Other Papers by  Robert Louis Stevenson\", \"member_id\": \"hemingway-ernest\", \"period\": \"1924-03-28/1925-03-28\", \"subscription_start\": \"1924-03-28\", \"subscription_end\": \"1925-03-28\", \"metric\": \"cosine\", \"score\": 0.213894987514974}, {\"item_uri\": \"graves-english-poetry-irregular\", \"formatted_chart_title\": \"*On English Poetry: Being an Irregular Approach to the Psychology of This Art, from Evidence Mainly Subjective*,<br> Robert Graves\", \"formatted_table_title\": \"On English Poetry: Being an Irregular Approach to the Psychology of This Art, from Evidence Mainly Subjective by  Robert Graves\", \"member_id\": \"hemingway-ernest\", \"period\": \"1924-03-28/1925-03-28\", \"subscription_start\": \"1924-03-28\", \"subscription_end\": \"1925-03-28\", \"metric\": \"cosine\", \"score\": 0.21369224743704024}, {\"item_uri\": \"swinnerton-casement\", \"formatted_chart_title\": \"*The Casement*,<br> Frank Swinnerton\", \"formatted_table_title\": \"The Casement by  Frank Swinnerton\", \"member_id\": \"hemingway-ernest\", \"period\": \"1924-03-28/1925-03-28\", \"subscription_start\": \"1924-03-28\", \"subscription_end\": \"1925-03-28\", \"metric\": \"cosine\", \"score\": 0.21365646488642595}, {\"item_uri\": \"ingram-true-chatterton-new\", \"formatted_chart_title\": \"*The True Chatterton: A New Study from Original Documents*,<br> John Henry Ingram\", \"formatted_table_title\": \"The True Chatterton: A New Study from Original Documents by  John Henry Ingram\", \"member_id\": \"hemingway-ernest\", \"period\": \"1924-03-28/1925-03-28\", \"subscription_start\": \"1924-03-28\", \"subscription_end\": \"1925-03-28\", \"metric\": \"cosine\", \"score\": 0.21357051830129872}, {\"item_uri\": \"gogol-overcoat-stories\", \"formatted_chart_title\": \"*The Overcoat and Other Stories*,<br> Nikolai Gogol\", \"formatted_table_title\": \"The Overcoat and Other Stories by  Nikolai Gogol\", \"member_id\": \"hemingway-ernest\", \"period\": \"1924-03-28/1925-03-28\", \"subscription_start\": \"1924-03-28\", \"subscription_end\": \"1925-03-28\", \"metric\": \"cosine\", \"score\": 0.19091097235236193}, {\"item_uri\": \"chesterton-heretics\", \"formatted_chart_title\": \"*Heretics*,<br> G. K. Chesterton\", \"formatted_table_title\": \"Heretics by  G. K. Chesterton\", \"member_id\": \"hemingway-ernest\", \"period\": \"1921-12-28/1922-11-08\", \"subscription_start\": \"1921-12-28\", \"subscription_end\": \"1922-11-08\", \"metric\": \"cosine\", \"score\": 0.19062223160705152}, {\"item_uri\": \"chesterton-heretics\", \"formatted_chart_title\": \"*Heretics*,<br> G. K. Chesterton\", \"formatted_table_title\": \"Heretics by  G. K. Chesterton\", \"member_id\": \"hemingway-ernest\", \"period\": \"1924-03-28/1925-03-28\", \"subscription_start\": \"1924-03-28\", \"subscription_end\": \"1925-03-28\", \"metric\": \"cosine\", \"score\": 0.19062223160705152}, {\"item_uri\": \"wells-outline-history\", \"formatted_chart_title\": \"*The Outline of History*,<br> H. G. Wells\", \"formatted_table_title\": \"The Outline of History by  H. G. Wells\", \"member_id\": \"hemingway-ernest\", \"period\": \"1921-12-28/1922-11-08\", \"subscription_start\": \"1921-12-28\", \"subscription_end\": \"1922-11-08\", \"metric\": \"cosine\", \"score\": 0.19061487020341214}, {\"item_uri\": \"wells-outline-history\", \"formatted_chart_title\": \"*The Outline of History*,<br> H. G. Wells\", \"formatted_table_title\": \"The Outline of History by  H. G. Wells\", \"member_id\": \"hemingway-ernest\", \"period\": \"1924-03-28/1925-03-28\", \"subscription_start\": \"1924-03-28\", \"subscription_end\": \"1925-03-28\", \"metric\": \"cosine\", \"score\": 0.19061487020341214}, {\"item_uri\": \"mencken-american-language\", \"formatted_chart_title\": \"*The American Language*,<br> H. L. Mencken\", \"formatted_table_title\": \"The American Language by  H. L. Mencken\", \"member_id\": \"hemingway-ernest\", \"period\": \"1924-03-28/1925-03-28\", \"subscription_start\": \"1924-03-28\", \"subscription_end\": \"1925-03-28\", \"metric\": \"cosine\", \"score\": 0.19048065834378775}, {\"item_uri\": \"mencken-american-language\", \"formatted_chart_title\": \"*The American Language*,<br> H. L. Mencken\", \"formatted_table_title\": \"The American Language by  H. L. Mencken\", \"member_id\": \"hemingway-ernest\", \"period\": \"1921-12-28/1922-11-08\", \"subscription_start\": \"1921-12-28\", \"subscription_end\": \"1922-11-08\", \"metric\": \"cosine\", \"score\": 0.19048065834378775}, {\"item_uri\": \"sinnett-growth-soul\", \"formatted_chart_title\": \"*The Growth of the Soul*,<br> A. P. Sinnett\", \"formatted_table_title\": \"The Growth of the Soul by  A. P. Sinnett\", \"member_id\": \"hemingway-ernest\", \"period\": \"1924-03-28/1925-03-28\", \"subscription_start\": \"1924-03-28\", \"subscription_end\": \"1925-03-28\", \"metric\": \"cosine\", \"score\": 0.19038458053107862}, {\"item_uri\": \"sinnett-growth-soul\", \"formatted_chart_title\": \"*The Growth of the Soul*,<br> A. P. Sinnett\", \"formatted_table_title\": \"The Growth of the Soul by  A. P. Sinnett\", \"member_id\": \"hemingway-ernest\", \"period\": \"1921-12-28/1922-11-08\", \"subscription_start\": \"1921-12-28\", \"subscription_end\": \"1922-11-08\", \"metric\": \"cosine\", \"score\": 0.19038458053107862}, {\"item_uri\": \"green-short-history-english\", \"formatted_chart_title\": \"*A Short History of the English People*,<br> John Richard Green\", \"formatted_table_title\": \"A Short History of the English People by  John Richard Green\", \"member_id\": \"hemingway-ernest\", \"period\": \"1921-12-28/1922-11-08\", \"subscription_start\": \"1921-12-28\", \"subscription_end\": \"1922-11-08\", \"metric\": \"cosine\", \"score\": 0.19033227643441178}, {\"item_uri\": \"green-short-history-english\", \"formatted_chart_title\": \"*A Short History of the English People*,<br> John Richard Green\", \"formatted_table_title\": \"A Short History of the English People by  John Richard Green\", \"member_id\": \"hemingway-ernest\", \"period\": \"1924-03-28/1925-03-28\", \"subscription_start\": \"1924-03-28\", \"subscription_end\": \"1925-03-28\", \"metric\": \"cosine\", \"score\": 0.19033227643441178}, {\"item_uri\": \"eastman-enjoyment-poetry\", \"formatted_chart_title\": \"*Enjoyment of Poetry*,<br> Max Eastman\", \"formatted_table_title\": \"Enjoyment of Poetry by  Max Eastman\", \"member_id\": \"hemingway-ernest\", \"period\": \"1921-12-28/1922-11-08\", \"subscription_start\": \"1921-12-28\", \"subscription_end\": \"1922-11-08\", \"metric\": \"cosine\", \"score\": 0.19015008493422908}, {\"item_uri\": \"eastman-enjoyment-poetry\", \"formatted_chart_title\": \"*Enjoyment of Poetry*,<br> Max Eastman\", \"formatted_table_title\": \"Enjoyment of Poetry by  Max Eastman\", \"member_id\": \"hemingway-ernest\", \"period\": \"1924-03-28/1925-03-28\", \"subscription_start\": \"1924-03-28\", \"subscription_end\": \"1925-03-28\", \"metric\": \"cosine\", \"score\": 0.19015008493422908}, {\"item_uri\": \"dunsany-fifty-one-tales\", \"formatted_chart_title\": \"*Fifty-One Tales*,<br> Lord Dunsany\", \"formatted_table_title\": \"Fifty-One Tales by  Lord Dunsany\", \"member_id\": \"hemingway-ernest\", \"period\": \"1924-03-28/1925-03-28\", \"subscription_start\": \"1924-03-28\", \"subscription_end\": \"1925-03-28\", \"metric\": \"cosine\", \"score\": 0.19007779005661957}, {\"item_uri\": \"dunsany-fifty-one-tales\", \"formatted_chart_title\": \"*Fifty-One Tales*,<br> Lord Dunsany\", \"formatted_table_title\": \"Fifty-One Tales by  Lord Dunsany\", \"member_id\": \"hemingway-ernest\", \"period\": \"1921-12-28/1922-11-08\", \"subscription_start\": \"1921-12-28\", \"subscription_end\": \"1922-11-08\", \"metric\": \"cosine\", \"score\": 0.19007779005661957}, {\"item_uri\": \"dickens-david-copperfield\", \"formatted_chart_title\": \"*David Copperfield*,<br> Charles Dickens\", \"formatted_table_title\": \"David Copperfield by  Charles Dickens\", \"member_id\": \"hemingway-ernest\", \"period\": \"1924-03-28/1925-03-28\", \"subscription_start\": \"1924-03-28\", \"subscription_end\": \"1925-03-28\", \"metric\": \"cosine\", \"score\": 0.17871792267964876}, {\"item_uri\": \"wells-outline-history\", \"formatted_chart_title\": \"*The Outline of History*,<br> H. G. Wells\", \"formatted_table_title\": \"The Outline of History by  H. G. Wells\", \"member_id\": \"hemingway-ernest\", \"period\": \"1921-12-28/1922-11-08\", \"subscription_start\": \"1921-12-28\", \"subscription_end\": \"1922-11-08\", \"metric\": \"pearson\", \"score\": 0.1415475875347493}, {\"item_uri\": \"wells-outline-history\", \"formatted_chart_title\": \"*The Outline of History*,<br> H. G. Wells\", \"formatted_table_title\": \"The Outline of History by  H. G. Wells\", \"member_id\": \"hemingway-ernest\", \"period\": \"1924-03-28/1925-03-28\", \"subscription_start\": \"1924-03-28\", \"subscription_end\": \"1925-03-28\", \"metric\": \"pearson\", \"score\": 0.1415475875347493}, {\"item_uri\": \"thompson-francis-thompsons-works\", \"formatted_chart_title\": \"*Works of Francis Thompson*,<br> Francis Thompson\", \"formatted_table_title\": \"Works of Francis Thompson by  Francis Thompson\", \"member_id\": \"hemingway-ernest\", \"period\": \"1924-03-28/1925-03-28\", \"subscription_start\": \"1924-03-28\", \"subscription_end\": \"1925-03-28\", \"metric\": \"pearson\", \"score\": 0.07378784406435185}, {\"item_uri\": \"moore-avowals\", \"formatted_chart_title\": \"*Avowals*,<br> George Moore\", \"formatted_table_title\": \"Avowals by  George Moore\", \"member_id\": \"hemingway-ernest\", \"period\": \"1924-03-28/1925-03-28\", \"subscription_start\": \"1924-03-28\", \"subscription_end\": \"1925-03-28\", \"metric\": \"pearson\", \"score\": 0.062249412996616876}, {\"item_uri\": \"carritt-theory-beauty\", \"formatted_chart_title\": \"*The Theory of Beauty*,<br> E. F. Carritt\", \"formatted_table_title\": \"The Theory of Beauty by  E. F. Carritt\", \"member_id\": \"hemingway-ernest\", \"period\": \"1924-03-28/1925-03-28\", \"subscription_start\": \"1924-03-28\", \"subscription_end\": \"1925-03-28\", \"metric\": \"pearson\", \"score\": 0.05930929374099561}, {\"item_uri\": \"wright-life-walter-pater\", \"formatted_chart_title\": \"*The Life of Walter Pater*,<br> Thomas Wright\", \"formatted_table_title\": \"The Life of Walter Pater by  Thomas Wright\", \"member_id\": \"hemingway-ernest\", \"period\": \"1921-12-28/1922-11-08\", \"subscription_start\": \"1921-12-28\", \"subscription_end\": \"1922-11-08\", \"metric\": \"pearson\", \"score\": 0.039539529160663736}, {\"item_uri\": \"abercrombie-thomas-hardy-critical\", \"formatted_chart_title\": \"*Thomas Hardy: A Critical Study*,<br> Lascelles Abercrombie\", \"formatted_table_title\": \"Thomas Hardy: A Critical Study by  Lascelles Abercrombie\", \"member_id\": \"hemingway-ernest\", \"period\": \"1921-12-28/1922-11-08\", \"subscription_start\": \"1921-12-28\", \"subscription_end\": \"1922-11-08\", \"metric\": \"pearson\", \"score\": 0.039539529160663736}, {\"item_uri\": \"bell-since-cezanne\", \"formatted_chart_title\": \"*Since C\\u00e9zanne*,<br> Clive Bell\", \"formatted_table_title\": \"Since C\\u00e9zanne by  Clive Bell\", \"member_id\": \"hemingway-ernest\", \"period\": \"1921-12-28/1922-11-08\", \"subscription_start\": \"1921-12-28\", \"subscription_end\": \"1922-11-08\", \"metric\": \"pearson\", \"score\": 0.039539529160663736}, {\"item_uri\": \"austen-lady-susan\", \"formatted_chart_title\": \"*Lady Susan*,<br> Jane Austen\", \"formatted_table_title\": \"Lady Susan by  Jane Austen\", \"member_id\": \"hemingway-ernest\", \"period\": \"1924-03-28/1925-03-28\", \"subscription_start\": \"1924-03-28\", \"subscription_end\": \"1925-03-28\", \"metric\": \"pearson\", \"score\": 0.039539529160663736}, {\"item_uri\": \"abercrombie-thomas-hardy-critical\", \"formatted_chart_title\": \"*Thomas Hardy: A Critical Study*,<br> Lascelles Abercrombie\", \"formatted_table_title\": \"Thomas Hardy: A Critical Study by  Lascelles Abercrombie\", \"member_id\": \"hemingway-ernest\", \"period\": \"1924-03-28/1925-03-28\", \"subscription_start\": \"1924-03-28\", \"subscription_end\": \"1925-03-28\", \"metric\": \"pearson\", \"score\": 0.039539529160663736}, {\"item_uri\": \"mencken-book-burlesques\", \"formatted_chart_title\": \"*A Book of Burlesques*,<br> H. L. Mencken\", \"formatted_table_title\": \"A Book of Burlesques by  H. L. Mencken\", \"member_id\": \"hemingway-ernest\", \"period\": \"1924-03-28/1925-03-28\", \"subscription_start\": \"1924-03-28\", \"subscription_end\": \"1925-03-28\", \"metric\": \"pearson\", \"score\": 0.039539529160663736}, {\"item_uri\": \"swinnerton-george-gissing-critical\", \"formatted_chart_title\": \"*George Gissing: A Critical Study*,<br> Frank Swinnerton\", \"formatted_table_title\": \"George Gissing: A Critical Study by  Frank Swinnerton\", \"member_id\": \"hemingway-ernest\", \"period\": \"1921-12-28/1922-11-08\", \"subscription_start\": \"1921-12-28\", \"subscription_end\": \"1922-11-08\", \"metric\": \"pearson\", \"score\": 0.039539529160663736}, {\"item_uri\": \"swinnerton-george-gissing-critical\", \"formatted_chart_title\": \"*George Gissing: A Critical Study*,<br> Frank Swinnerton\", \"formatted_table_title\": \"George Gissing: A Critical Study by  Frank Swinnerton\", \"member_id\": \"hemingway-ernest\", \"period\": \"1924-03-28/1925-03-28\", \"subscription_start\": \"1924-03-28\", \"subscription_end\": \"1925-03-28\", \"metric\": \"pearson\", \"score\": 0.039539529160663736}, {\"item_uri\": \"lindsay-daniel-jazz-poems\", \"formatted_chart_title\": \"*The Daniel Jazz and Other Poems*,<br> Vachel Lindsay\", \"formatted_table_title\": \"The Daniel Jazz and Other Poems by  Vachel Lindsay\", \"member_id\": \"hemingway-ernest\", \"period\": \"1924-03-28/1925-03-28\", \"subscription_start\": \"1924-03-28\", \"subscription_end\": \"1925-03-28\", \"metric\": \"pearson\", \"score\": 0.039539529160663736}, {\"item_uri\": \"snaith-van-roon\", \"formatted_chart_title\": \"*The Van Roon*,<br> J. C. Snaith\", \"formatted_table_title\": \"The Van Roon by  J. C. Snaith\", \"member_id\": \"hemingway-ernest\", \"period\": \"1924-03-28/1925-03-28\", \"subscription_start\": \"1924-03-28\", \"subscription_end\": \"1925-03-28\", \"metric\": \"pearson\", \"score\": 0.039539529160663736}, {\"item_uri\": \"smollett-adventures-roderick-random\", \"formatted_chart_title\": \"*The Adventures of Roderick Random*,<br> Tobias Smollett\", \"formatted_table_title\": \"The Adventures of Roderick Random by  Tobias Smollett\", \"member_id\": \"hemingway-ernest\", \"period\": \"1924-03-28/1925-03-28\", \"subscription_start\": \"1924-03-28\", \"subscription_end\": \"1925-03-28\", \"metric\": \"pearson\", \"score\": 0.039539529160663736}, {\"item_uri\": \"bell-since-cezanne\", \"formatted_chart_title\": \"*Since C\\u00e9zanne*,<br> Clive Bell\", \"formatted_table_title\": \"Since C\\u00e9zanne by  Clive Bell\", \"member_id\": \"hemingway-ernest\", \"period\": \"1924-03-28/1925-03-28\", \"subscription_start\": \"1924-03-28\", \"subscription_end\": \"1925-03-28\", \"metric\": \"pearson\", \"score\": 0.039539529160663736}, {\"item_uri\": \"lindsay-daniel-jazz-poems\", \"formatted_chart_title\": \"*The Daniel Jazz and Other Poems*,<br> Vachel Lindsay\", \"formatted_table_title\": \"The Daniel Jazz and Other Poems by  Vachel Lindsay\", \"member_id\": \"hemingway-ernest\", \"period\": \"1921-12-28/1922-11-08\", \"subscription_start\": \"1921-12-28\", \"subscription_end\": \"1922-11-08\", \"metric\": \"pearson\", \"score\": 0.039539529160663736}, {\"item_uri\": \"thoreau-essays-writings-henry\", \"formatted_chart_title\": \"*Essays and Other Writings of Henry Thoreau*,<br> Henry David Thoreau\", \"formatted_table_title\": \"Essays and Other Writings of Henry Thoreau by  Henry David Thoreau\", \"member_id\": \"hemingway-ernest\", \"period\": \"1924-03-28/1925-03-28\", \"subscription_start\": \"1924-03-28\", \"subscription_end\": \"1925-03-28\", \"metric\": \"pearson\", \"score\": 0.039539529160663736}, {\"item_uri\": \"jones-samuel-butler\", \"formatted_chart_title\": \"*Samuel Butler*,<br> Henry Festing Jones\", \"formatted_table_title\": \"Samuel Butler by  Henry Festing Jones\", \"member_id\": \"hemingway-ernest\", \"period\": \"1924-03-28/1925-03-28\", \"subscription_start\": \"1924-03-28\", \"subscription_end\": \"1925-03-28\", \"metric\": \"pearson\", \"score\": 0.039539529160663736}, {\"item_uri\": \"jones-samuel-butler\", \"formatted_chart_title\": \"*Samuel Butler*,<br> Henry Festing Jones\", \"formatted_table_title\": \"Samuel Butler by  Henry Festing Jones\", \"member_id\": \"hemingway-ernest\", \"period\": \"1921-12-28/1922-11-08\", \"subscription_start\": \"1921-12-28\", \"subscription_end\": \"1922-11-08\", \"metric\": \"pearson\", \"score\": 0.039539529160663736}, {\"item_uri\": \"jameson-clash\", \"formatted_chart_title\": \"*The Clash*,<br> Storm Jameson\", \"formatted_table_title\": \"The Clash by  Storm Jameson\", \"member_id\": \"hemingway-ernest\", \"period\": \"1924-03-28/1925-03-28\", \"subscription_start\": \"1924-03-28\", \"subscription_end\": \"1925-03-28\", \"metric\": \"pearson\", \"score\": 0.039539529160663736}, {\"item_uri\": \"jameson-clash\", \"formatted_chart_title\": \"*The Clash*,<br> Storm Jameson\", \"formatted_table_title\": \"The Clash by  Storm Jameson\", \"member_id\": \"hemingway-ernest\", \"period\": \"1921-12-28/1922-11-08\", \"subscription_start\": \"1921-12-28\", \"subscription_end\": \"1922-11-08\", \"metric\": \"pearson\", \"score\": 0.039539529160663736}, {\"item_uri\": \"twain-mark-twains-autobiography\", \"formatted_chart_title\": \"*Mark Twain's Autobiography*,<br> Mark Twain\", \"formatted_table_title\": \"Mark Twain's Autobiography by  Mark Twain\", \"member_id\": \"hemingway-ernest\", \"period\": \"1924-03-28/1925-03-28\", \"subscription_start\": \"1924-03-28\", \"subscription_end\": \"1925-03-28\", \"metric\": \"pearson\", \"score\": 0.039539529160663736}, {\"item_uri\": \"byron-lord-byrons-correspondence\", \"formatted_chart_title\": \"*Lord Byron's Correspondence*,<br> George Gordon Byron Byron\", \"formatted_table_title\": \"Lord Byron's Correspondence by  George Gordon Byron Byron\", \"member_id\": \"hemingway-ernest\", \"period\": \"1924-03-28/1925-03-28\", \"subscription_start\": \"1924-03-28\", \"subscription_end\": \"1925-03-28\", \"metric\": \"pearson\", \"score\": 0.039539529160663736}, {\"item_uri\": \"chesterton-things-considered\", \"formatted_chart_title\": \"*All Things Considered*,<br> G. K. Chesterton\", \"formatted_table_title\": \"All Things Considered by  G. K. Chesterton\", \"member_id\": \"hemingway-ernest\", \"period\": \"1924-03-28/1925-03-28\", \"subscription_start\": \"1924-03-28\", \"subscription_end\": \"1925-03-28\", \"metric\": \"pearson\", \"score\": 0.039539529160663736}, {\"item_uri\": \"corkery-threshold-quiet\", \"formatted_chart_title\": \"*The Threshold of Quiet*,<br> Daniel Corkery\", \"formatted_table_title\": \"The Threshold of Quiet by  Daniel Corkery\", \"member_id\": \"hemingway-ernest\", \"period\": \"1924-03-28/1925-03-28\", \"subscription_start\": \"1924-03-28\", \"subscription_end\": \"1925-03-28\", \"metric\": \"pearson\", \"score\": 0.039539529160663736}, {\"item_uri\": \"galsworthy-villa-rubein\", \"formatted_chart_title\": \"*Villa Rubein*,<br> John Galsworthy\", \"formatted_table_title\": \"Villa Rubein by  John Galsworthy\", \"member_id\": \"hemingway-ernest\", \"period\": \"1924-03-28/1925-03-28\", \"subscription_start\": \"1924-03-28\", \"subscription_end\": \"1925-03-28\", \"metric\": \"pearson\", \"score\": 0.039539529160663736}, {\"item_uri\": \"dostoyevsky-eternal-husband-stories\", \"formatted_chart_title\": \"*The Eternal Husband and Other Stories*,<br> Fyodor Dostoyevsky\", \"formatted_table_title\": \"The Eternal Husband and Other Stories by  Fyodor Dostoyevsky\", \"member_id\": \"hemingway-ernest\", \"period\": \"1924-03-28/1925-03-28\", \"subscription_start\": \"1924-03-28\", \"subscription_end\": \"1925-03-28\", \"metric\": \"pearson\", \"score\": 0.039539529160663736}, {\"item_uri\": \"wright-life-walter-pater\", \"formatted_chart_title\": \"*The Life of Walter Pater*,<br> Thomas Wright\", \"formatted_table_title\": \"The Life of Walter Pater by  Thomas Wright\", \"member_id\": \"hemingway-ernest\", \"period\": \"1924-03-28/1925-03-28\", \"subscription_start\": \"1924-03-28\", \"subscription_end\": \"1925-03-28\", \"metric\": \"pearson\", \"score\": 0.039539529160663736}, {\"item_uri\": \"george-bed-roses\", \"formatted_chart_title\": \"*A Bed of Roses*,<br> Walter Lionel George\", \"formatted_table_title\": \"A Bed of Roses by  Walter Lionel George\", \"member_id\": \"hemingway-ernest\", \"period\": \"1924-03-28/1925-03-28\", \"subscription_start\": \"1924-03-28\", \"subscription_end\": \"1925-03-28\", \"metric\": \"pearson\", \"score\": 0.039539529160663736}, {\"item_uri\": \"white-gold\", \"formatted_chart_title\": \"*Gold*,<br> Stewart Edward White\", \"formatted_table_title\": \"Gold by  Stewart Edward White\", \"member_id\": \"hemingway-ernest\", \"period\": \"1924-03-28/1925-03-28\", \"subscription_start\": \"1924-03-28\", \"subscription_end\": \"1925-03-28\", \"metric\": \"pearson\", \"score\": 0.039539529160663736}, {\"item_uri\": \"wells-washington-hope-peace\", \"formatted_chart_title\": \"*Washington and the Hope of Peace*,<br> H. G. Wells\", \"formatted_table_title\": \"Washington and the Hope of Peace by  H. G. Wells\", \"member_id\": \"hemingway-ernest\", \"period\": \"1921-12-28/1922-11-08\", \"subscription_start\": \"1921-12-28\", \"subscription_end\": \"1922-11-08\", \"metric\": \"pearson\", \"score\": 0.039539529160663736}, {\"item_uri\": \"wells-washington-hope-peace\", \"formatted_chart_title\": \"*Washington and the Hope of Peace*,<br> H. G. Wells\", \"formatted_table_title\": \"Washington and the Hope of Peace by  H. G. Wells\", \"member_id\": \"hemingway-ernest\", \"period\": \"1924-03-28/1925-03-28\", \"subscription_start\": \"1924-03-28\", \"subscription_end\": \"1925-03-28\", \"metric\": \"pearson\", \"score\": 0.039539529160663736}, {\"item_uri\": \"rhys-rabindranath-tagore-biographical\", \"formatted_chart_title\": \"*Rabindranath Tagore: A Biographical Study*,<br> Ernest Rhys\", \"formatted_table_title\": \"Rabindranath Tagore: A Biographical Study by  Ernest Rhys\", \"member_id\": \"hemingway-ernest\", \"period\": \"1921-12-28/1922-11-08\", \"subscription_start\": \"1921-12-28\", \"subscription_end\": \"1922-11-08\", \"metric\": \"pearson\", \"score\": 0.03856259309304352}, {\"item_uri\": \"rhys-rabindranath-tagore-biographical\", \"formatted_chart_title\": \"*Rabindranath Tagore: A Biographical Study*,<br> Ernest Rhys\", \"formatted_table_title\": \"Rabindranath Tagore: A Biographical Study by  Ernest Rhys\", \"member_id\": \"hemingway-ernest\", \"period\": \"1924-03-28/1925-03-28\", \"subscription_start\": \"1924-03-28\", \"subscription_end\": \"1925-03-28\", \"metric\": \"pearson\", \"score\": 0.03856259309304352}, {\"item_uri\": \"chesterton-heretics\", \"formatted_chart_title\": \"*Heretics*,<br> G. K. Chesterton\", \"formatted_table_title\": \"Heretics by  G. K. Chesterton\", \"member_id\": \"hemingway-ernest\", \"period\": \"1921-12-28/1922-11-08\", \"subscription_start\": \"1921-12-28\", \"subscription_end\": \"1922-11-08\", \"metric\": \"pearson\", \"score\": 0.035684107111665246}, {\"item_uri\": \"chesterton-heretics\", \"formatted_chart_title\": \"*Heretics*,<br> G. K. Chesterton\", \"formatted_table_title\": \"Heretics by  G. K. Chesterton\", \"member_id\": \"hemingway-ernest\", \"period\": \"1924-03-28/1925-03-28\", \"subscription_start\": \"1924-03-28\", \"subscription_end\": \"1925-03-28\", \"metric\": \"pearson\", \"score\": 0.035684107111665246}, {\"item_uri\": \"carr-philosophy-benedetto-croce\", \"formatted_chart_title\": \"*The Philosophy of Benedetto Croce: The Problem of Art and History*,<br> Herbert Wildon Carr\", \"formatted_table_title\": \"The Philosophy of Benedetto Croce: The Problem of Art and History by  Herbert Wildon Carr\", \"member_id\": \"hemingway-ernest\", \"period\": \"1924-03-28/1925-03-28\", \"subscription_start\": \"1924-03-28\", \"subscription_end\": \"1925-03-28\", \"metric\": \"pearson\", \"score\": 0.03388724161552601}, {\"item_uri\": \"fitzgerald-side-paradise\", \"formatted_chart_title\": \"*This Side of Paradise*,<br> F. Scott Fitzgerald\", \"formatted_table_title\": \"This Side of Paradise by  F. Scott Fitzgerald\", \"member_id\": \"hemingway-ernest\", \"period\": \"1924-03-28/1925-03-28\", \"subscription_start\": \"1924-03-28\", \"subscription_end\": \"1925-03-28\", \"metric\": \"pearson\", \"score\": 0.032139499341257094}, {\"item_uri\": \"fitzgerald-side-paradise\", \"formatted_chart_title\": \"*This Side of Paradise*,<br> F. Scott Fitzgerald\", \"formatted_table_title\": \"This Side of Paradise by  F. Scott Fitzgerald\", \"member_id\": \"hemingway-ernest\", \"period\": \"1921-12-28/1922-11-08\", \"subscription_start\": \"1921-12-28\", \"subscription_end\": \"1922-11-08\", \"metric\": \"pearson\", \"score\": 0.032139499341257094}, {\"item_uri\": \"du-bois-darkwater\", \"formatted_chart_title\": \"*Darkwater: Voices from within the Veil*,<br> W. E. B. Du Bois\", \"formatted_table_title\": \"Darkwater: Voices from within the Veil by  W. E. B. Du Bois\", \"member_id\": \"hemingway-ernest\", \"period\": \"1921-12-28/1922-11-08\", \"subscription_start\": \"1921-12-28\", \"subscription_end\": \"1922-11-08\", \"metric\": \"pearson\", \"score\": 0.03109151284840951}, {\"item_uri\": \"du-bois-darkwater\", \"formatted_chart_title\": \"*Darkwater: Voices from within the Veil*,<br> W. E. B. Du Bois\", \"formatted_table_title\": \"Darkwater: Voices from within the Veil by  W. E. B. Du Bois\", \"member_id\": \"hemingway-ernest\", \"period\": \"1924-03-28/1925-03-28\", \"subscription_start\": \"1924-03-28\", \"subscription_end\": \"1925-03-28\", \"metric\": \"pearson\", \"score\": 0.03109151284840951}, {\"item_uri\": \"swinnerton-casement\", \"formatted_chart_title\": \"*The Casement*,<br> Frank Swinnerton\", \"formatted_table_title\": \"The Casement by  Frank Swinnerton\", \"member_id\": \"hemingway-ernest\", \"period\": \"1924-03-28/1925-03-28\", \"subscription_start\": \"1924-03-28\", \"subscription_end\": \"1925-03-28\", \"metric\": \"pearson\", \"score\": 0.030012860091750387}, {\"item_uri\": \"stevenson-virginibus-puerisque-papers\", \"formatted_chart_title\": \"*Virginibus Puerisque and Other Papers*,<br> Robert Louis Stevenson\", \"formatted_table_title\": \"Virginibus Puerisque and Other Papers by  Robert Louis Stevenson\", \"member_id\": \"hemingway-ernest\", \"period\": \"1921-12-28/1922-11-08\", \"subscription_start\": \"1921-12-28\", \"subscription_end\": \"1922-11-08\", \"metric\": \"pearson\", \"score\": 0.029234024460296028}, {\"item_uri\": \"stevenson-virginibus-puerisque-papers\", \"formatted_chart_title\": \"*Virginibus Puerisque and Other Papers*,<br> Robert Louis Stevenson\", \"formatted_table_title\": \"Virginibus Puerisque and Other Papers by  Robert Louis Stevenson\", \"member_id\": \"hemingway-ernest\", \"period\": \"1924-03-28/1925-03-28\", \"subscription_start\": \"1924-03-28\", \"subscription_end\": \"1925-03-28\", \"metric\": \"pearson\", \"score\": 0.029234024460296028}, {\"item_uri\": \"shakespeare-shakespeare\", \"formatted_chart_title\": \"*Shakespeare*,<br> William Shakespeare\", \"formatted_table_title\": \"Shakespeare by  William Shakespeare\", \"member_id\": \"hemingway-ernest\", \"period\": \"1921-12-28/1922-11-08\", \"subscription_start\": \"1921-12-28\", \"subscription_end\": \"1922-11-08\", \"metric\": \"pearson\", \"score\": 0.028509314538118082}, {\"item_uri\": \"shakespeare-shakespeare\", \"formatted_chart_title\": \"*Shakespeare*,<br> William Shakespeare\", \"formatted_table_title\": \"Shakespeare by  William Shakespeare\", \"member_id\": \"hemingway-ernest\", \"period\": \"1924-03-28/1925-03-28\", \"subscription_start\": \"1924-03-28\", \"subscription_end\": \"1925-03-28\", \"metric\": \"pearson\", \"score\": 0.028509314538118082}, {\"item_uri\": \"green-short-history-english\", \"formatted_chart_title\": \"*A Short History of the English People*,<br> John Richard Green\", \"formatted_table_title\": \"A Short History of the English People by  John Richard Green\", \"member_id\": \"hemingway-ernest\", \"period\": \"1924-03-28/1925-03-28\", \"subscription_start\": \"1924-03-28\", \"subscription_end\": \"1925-03-28\", \"metric\": \"pearson\", \"score\": 0.027665901321502963}, {\"item_uri\": \"green-short-history-english\", \"formatted_chart_title\": \"*A Short History of the English People*,<br> John Richard Green\", \"formatted_table_title\": \"A Short History of the English People by  John Richard Green\", \"member_id\": \"hemingway-ernest\", \"period\": \"1921-12-28/1922-11-08\", \"subscription_start\": \"1921-12-28\", \"subscription_end\": \"1922-11-08\", \"metric\": \"pearson\", \"score\": 0.027665901321502963}, {\"item_uri\": \"graves-english-poetry-irregular\", \"formatted_chart_title\": \"*On English Poetry: Being an Irregular Approach to the Psychology of This Art, from Evidence Mainly Subjective*,<br> Robert Graves\", \"formatted_table_title\": \"On English Poetry: Being an Irregular Approach to the Psychology of This Art, from Evidence Mainly Subjective by  Robert Graves\", \"member_id\": \"hemingway-ernest\", \"period\": \"1924-03-28/1925-03-28\", \"subscription_start\": \"1924-03-28\", \"subscription_end\": \"1925-03-28\", \"metric\": \"pearson\", \"score\": 0.027439949130183987}, {\"item_uri\": \"sinnett-growth-soul\", \"formatted_chart_title\": \"*The Growth of the Soul*,<br> A. P. Sinnett\", \"formatted_table_title\": \"The Growth of the Soul by  A. P. Sinnett\", \"member_id\": \"hemingway-ernest\", \"period\": \"1924-03-28/1925-03-28\", \"subscription_start\": \"1924-03-28\", \"subscription_end\": \"1925-03-28\", \"metric\": \"pearson\", \"score\": 0.026095235793821715}, {\"item_uri\": \"sinnett-growth-soul\", \"formatted_chart_title\": \"*The Growth of the Soul*,<br> A. P. Sinnett\", \"formatted_table_title\": \"The Growth of the Soul by  A. P. Sinnett\", \"member_id\": \"hemingway-ernest\", \"period\": \"1921-12-28/1922-11-08\", \"subscription_start\": \"1921-12-28\", \"subscription_end\": \"1922-11-08\", \"metric\": \"pearson\", \"score\": 0.026095235793821715}, {\"item_uri\": \"wharton-house-mirth\", \"formatted_chart_title\": \"*The House of Mirth*,<br> Edith Wharton\", \"formatted_table_title\": \"The House of Mirth by  Edith Wharton\", \"member_id\": \"hemingway-ernest\", \"period\": \"1924-03-28/1925-03-28\", \"subscription_start\": \"1924-03-28\", \"subscription_end\": \"1925-03-28\", \"metric\": \"pearson\", \"score\": 0.025471819222380076}, {\"item_uri\": \"mencken-american-language\", \"formatted_chart_title\": \"*The American Language*,<br> H. L. Mencken\", \"formatted_table_title\": \"The American Language by  H. L. Mencken\", \"member_id\": \"hemingway-ernest\", \"period\": \"1921-12-28/1922-11-08\", \"subscription_start\": \"1921-12-28\", \"subscription_end\": \"1922-11-08\", \"metric\": \"pearson\", \"score\": 0.02466340372576836}, {\"item_uri\": \"mencken-american-language\", \"formatted_chart_title\": \"*The American Language*,<br> H. L. Mencken\", \"formatted_table_title\": \"The American Language by  H. L. Mencken\", \"member_id\": \"hemingway-ernest\", \"period\": \"1924-03-28/1925-03-28\", \"subscription_start\": \"1924-03-28\", \"subscription_end\": \"1925-03-28\", \"metric\": \"pearson\", \"score\": 0.02466340372576836}, {\"item_uri\": \"gogol-overcoat-stories\", \"formatted_chart_title\": \"*The Overcoat and Other Stories*,<br> Nikolai Gogol\", \"formatted_table_title\": \"The Overcoat and Other Stories by  Nikolai Gogol\", \"member_id\": \"hemingway-ernest\", \"period\": \"1924-03-28/1925-03-28\", \"subscription_start\": \"1924-03-28\", \"subscription_end\": \"1925-03-28\", \"metric\": \"pearson\", \"score\": 0.023416034396733305}, {\"item_uri\": \"dunsany-fifty-one-tales\", \"formatted_chart_title\": \"*Fifty-One Tales*,<br> Lord Dunsany\", \"formatted_table_title\": \"Fifty-One Tales by  Lord Dunsany\", \"member_id\": \"hemingway-ernest\", \"period\": \"1921-12-28/1922-11-08\", \"subscription_start\": \"1921-12-28\", \"subscription_end\": \"1922-11-08\", \"metric\": \"pearson\", \"score\": 0.0233549531456864}, {\"item_uri\": \"dunsany-fifty-one-tales\", \"formatted_chart_title\": \"*Fifty-One Tales*,<br> Lord Dunsany\", \"formatted_table_title\": \"Fifty-One Tales by  Lord Dunsany\", \"member_id\": \"hemingway-ernest\", \"period\": \"1924-03-28/1925-03-28\", \"subscription_start\": \"1924-03-28\", \"subscription_end\": \"1925-03-28\", \"metric\": \"pearson\", \"score\": 0.0233549531456864}, {\"item_uri\": \"eastman-enjoyment-poetry\", \"formatted_chart_title\": \"*Enjoyment of Poetry*,<br> Max Eastman\", \"formatted_table_title\": \"Enjoyment of Poetry by  Max Eastman\", \"member_id\": \"hemingway-ernest\", \"period\": \"1924-03-28/1925-03-28\", \"subscription_start\": \"1924-03-28\", \"subscription_end\": \"1925-03-28\", \"metric\": \"pearson\", \"score\": 0.022647042568459924}, {\"item_uri\": \"eastman-enjoyment-poetry\", \"formatted_chart_title\": \"*Enjoyment of Poetry*,<br> Max Eastman\", \"formatted_table_title\": \"Enjoyment of Poetry by  Max Eastman\", \"member_id\": \"hemingway-ernest\", \"period\": \"1921-12-28/1922-11-08\", \"subscription_start\": \"1921-12-28\", \"subscription_end\": \"1922-11-08\", \"metric\": \"pearson\", \"score\": 0.022647042568459924}, {\"item_uri\": \"pound-instigations-ezra-pound\", \"formatted_chart_title\": \"*Instigations of Ezra Pound: Together with an Essay on the Chinese Written Character, by Ernest Fenollosa*,<br> Ernest  Ezra;Fenollosa Pound\", \"formatted_table_title\": \"Instigations of Ezra Pound: Together with an Essay on the Chinese Written Character, by Ernest Fenollosa by  Ernest  Ezra;Fenollosa Pound\", \"member_id\": \"hemingway-ernest\", \"period\": \"1921-12-28/1922-11-08\", \"subscription_start\": \"1921-12-28\", \"subscription_end\": \"1922-11-08\", \"metric\": \"pearson\", \"score\": 0.0}, {\"item_uri\": \"ingram-true-chatterton-new\", \"formatted_chart_title\": \"*The True Chatterton: A New Study from Original Documents*,<br> John Henry Ingram\", \"formatted_table_title\": \"The True Chatterton: A New Study from Original Documents by  John Henry Ingram\", \"member_id\": \"hemingway-ernest\", \"period\": \"1924-03-28/1925-03-28\", \"subscription_start\": \"1924-03-28\", \"subscription_end\": \"1925-03-28\", \"metric\": \"pearson\", \"score\": 0.0}, {\"item_uri\": \"pound-instigations-ezra-pound\", \"formatted_chart_title\": \"*Instigations of Ezra Pound: Together with an Essay on the Chinese Written Character, by Ernest Fenollosa*,<br> Ernest  Ezra;Fenollosa Pound\", \"formatted_table_title\": \"Instigations of Ezra Pound: Together with an Essay on the Chinese Written Character, by Ernest Fenollosa by  Ernest  Ezra;Fenollosa Pound\", \"member_id\": \"hemingway-ernest\", \"period\": \"1924-03-28/1925-03-28\", \"subscription_start\": \"1924-03-28\", \"subscription_end\": \"1925-03-28\", \"metric\": \"pearson\", \"score\": 0.0}, {\"item_uri\": \"freud-totem-taboo\", \"formatted_chart_title\": \"*Totem and Taboo*,<br> Sigmund Freud\", \"formatted_table_title\": \"Totem and Taboo by  Sigmund Freud\", \"member_id\": \"hemingway-ernest\", \"period\": \"1924-03-28/1925-03-28\", \"subscription_start\": \"1924-03-28\", \"subscription_end\": \"1925-03-28\", \"metric\": \"pearson\", \"score\": 0.0}, {\"item_uri\": \"freud-totem-taboo\", \"formatted_chart_title\": \"*Totem and Taboo*,<br> Sigmund Freud\", \"formatted_table_title\": \"Totem and Taboo by  Sigmund Freud\", \"member_id\": \"hemingway-ernest\", \"period\": \"1921-12-28/1922-11-08\", \"subscription_start\": \"1921-12-28\", \"subscription_end\": \"1922-11-08\", \"metric\": \"pearson\", \"score\": 0.0}, {\"item_uri\": \"fielding-history-tom-jones\", \"formatted_chart_title\": \"*The History of Tom Jones, a Foundling*,<br> Henry Fielding\", \"formatted_table_title\": \"The History of Tom Jones, a Foundling by  Henry Fielding\", \"member_id\": \"hemingway-ernest\", \"period\": \"1924-03-28/1925-03-28\", \"subscription_start\": \"1924-03-28\", \"subscription_end\": \"1925-03-28\", \"metric\": \"pearson\", \"score\": 0.0}, {\"item_uri\": \"fielding-history-tom-jones\", \"formatted_chart_title\": \"*The History of Tom Jones, a Foundling*,<br> Henry Fielding\", \"formatted_table_title\": \"The History of Tom Jones, a Foundling by  Henry Fielding\", \"member_id\": \"hemingway-ernest\", \"period\": \"1921-12-28/1922-11-08\", \"subscription_start\": \"1921-12-28\", \"subscription_end\": \"1922-11-08\", \"metric\": \"pearson\", \"score\": 0.0}, {\"item_uri\": \"shaw-unsocial-socialist\", \"formatted_chart_title\": \"*An Unsocial Socialist*,<br> George Bernard Shaw\", \"formatted_table_title\": \"An Unsocial Socialist by  George Bernard Shaw\", \"member_id\": \"hemingway-ernest\", \"period\": \"1921-12-28/1922-11-08\", \"subscription_start\": \"1921-12-28\", \"subscription_end\": \"1922-11-08\", \"metric\": \"pearson\", \"score\": 0.0}, {\"item_uri\": \"shaw-unsocial-socialist\", \"formatted_chart_title\": \"*An Unsocial Socialist*,<br> George Bernard Shaw\", \"formatted_table_title\": \"An Unsocial Socialist by  George Bernard Shaw\", \"member_id\": \"hemingway-ernest\", \"period\": \"1924-03-28/1925-03-28\", \"subscription_start\": \"1924-03-28\", \"subscription_end\": \"1925-03-28\", \"metric\": \"pearson\", \"score\": 0.0}]}}, {\"mode\": \"vega-lite\"});\n",
       "</script>"
      ],
      "text/plain": [
       "alt.Chart(...)"
      ]
     },
     "execution_count": 26,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "chart = alt.Chart(preds_df[preds_df.item_uri.isin(top_items)]).mark_point(opacity=0.8, filled=True, thickness=3).encode(\n",
    "    y=alt.Y('formatted_chart_title', sort='-x',  axis=alt.Axis(title='Predicted Book', orient='right')),\n",
    "    x='score',\n",
    "    color=alt.Color('period:N', legend=alt.Legend(title='Subscription Periods With Missing Records', orient='left')),\n",
    "    # column='member_id:N',\n",
    "    shape=alt.Shape('metric:N'),\n",
    ").properties(\n",
    "    width=300,\n",
    "    title='Top Predictions by Collaborative Filtering Memory-Based Methods'\n",
    ")\n",
    "chart = chart.configure_axisY(\n",
    "        titleAngle=0,\n",
    "        titleAlign=\"left\",\n",
    "        titleY=-10,\n",
    "        titleX=-100,\n",
    "        labelLimit=1000\n",
    "    )\n",
    "\n",
    "chart"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 29,
   "metadata": {},
   "outputs": [],
   "source": [
    "# Group 'preds_df' by member ID, subscription start and end times, period, item URI, and formatted table and chart titles.\n",
    "# Calculate the median, skewness, standard deviation, and variance of the scores for each group.\n",
    "# Reset the index of the resulting DataFrame and flatten the multi-level column names.\n",
    "metrics_df = preds_df.groupby(['member_id', 'subscription_start', 'subscription_end', 'period', 'item_uri', 'formatted_table_title', 'formatted_chart_title']).agg({'score': [np.median, 'skew', 'std', 'var']}).reset_index()\n",
    "metrics_df.columns = list(map(''.join, metrics_df.columns.values))\n",
    "metrics_df.columns = [col if 'score' not in col else col.split('score')[1] for col in metrics_df.columns ]\n",
    "\n",
    "# Calculate the kurtosis of the scores for each group and add it to 'metrics_df'.\n",
    "kurt_df = preds_df.groupby(['member_id', 'subscription_start', 'subscription_end', 'period', 'item_uri', 'formatted_table_title', 'formatted_chart_title'])['score'].apply(pd.DataFrame.kurt).reset_index(name='kurtosis')\n",
    "final_df = pd.merge(metrics_df, kurt_df, on=['member_id', 'subscription_start', 'subscription_end', 'period', 'item_uri', 'formatted_table_title', 'formatted_chart_title'])\n",
    "\n",
    "# Merge 'final_df' with 'preds_df' to add the original scores.\n",
    "final_df = pd.merge(final_df, preds_df, on=['member_id', 'subscription_start', 'subscription_end', 'period', 'item_uri', 'formatted_table_title', 'formatted_chart_title'], how='left')\n",
    "\n",
    "# Calculate the z-scores of the scores for each group.\n",
    "final_df['zscore'] = final_df.groupby(['member_id', 'subscription_start', 'subscription_end', 'period', 'item_uri', 'formatted_table_title', 'formatted_chart_title'])['score'].transform(lambda x : zscore(x,ddof=1))\n",
    "\n",
    "# Calculate the maximum score for each group and merge it with 'final_df'.\n",
    "top_scores = final_df.groupby(['member_id', 'subscription_start', 'subscription_end', 'period', 'item_uri', 'formatted_table_title', 'formatted_chart_title']).agg({'score':'max'})[['score']].reset_index()\n",
    "top_scores = pd.merge(top_scores, final_df, on=top_scores.columns.tolist(), how='inner')\n",
    "top_scores = top_scores.rename(columns={'score': 'top_score', 'zscore' : 'top_zscore'})\n",
    "\n",
    "# Calculate the average score for each group and merge it with 'top_scores'.\n",
    "avg_scores = final_df.groupby(['member_id', 'subscription_start', 'subscription_end', 'period', 'item_uri', 'formatted_table_title', 'formatted_chart_title'])['score'].mean().reset_index(name='avg_score')\n",
    "scores_df = pd.merge(top_scores, avg_scores, on=['member_id', 'subscription_start', 'subscription_end', 'period', 'item_uri', 'formatted_table_title', 'formatted_chart_title'])\n",
    "\n",
    "# Calculate the median score for each group and merge it with 'scores_df'.\n",
    "median_scores = final_df.groupby(['member_id', 'subscription_start', 'subscription_end', 'period', 'item_uri', 'formatted_table_title', 'formatted_chart_title'])['score'].median().reset_index(name='median_score')\n",
    "scores_df = pd.merge(scores_df, median_scores, on=['member_id', 'subscription_start', 'subscription_end', 'period', 'item_uri', 'formatted_table_title', 'formatted_chart_title'])\n",
    "\n",
    "# Calculate the standard deviation of the scores for each group and merge it with 'scores_df'.\n",
    "std_scores = final_df.groupby(['member_id', 'subscription_start', 'subscription_end', 'period', 'item_uri', 'formatted_table_title', 'formatted_chart_title']).agg({'score': 'std'}).reset_index()\n",
    "std_scores = std_scores.rename(columns={'score': 'std_score'})\n",
    "scores_df = pd.merge(scores_df, std_scores, on=['member_id', 'subscription_start', 'subscription_end', 'period', 'item_uri', 'formatted_table_title', 'formatted_chart_title'])\n",
    "\n",
    "# Calculate the mode of the scores for each group and merge it with 'final_df'.\n",
    "mode_scores = preds_df.groupby(['member_id', 'period', 'subscription_start', 'subscription_end','item_uri'])['score'].agg(lambda x: pd.Series.mode(x).iat[0]).reset_index()\n",
    "mode_scores = pd.merge(mode_scores, final_df, on=mode_scores.columns.tolist(), how='inner')\n",
    "mode_scores = mode_scores.rename(columns={'score': 'mode_score', 'zscore' : 'mode_zscore'})\n",
    "\n",
    "# Merge 'mode_scores' with 'scores_df' to create the final DataFrame of scores.\n",
    "final_scores = pd.merge(mode_scores[['member_id', 'period', 'item_uri', 'formatted_table_title', 'formatted_chart_title', 'mode_score', 'mode_zscore', 'subscription_start', 'subscription_end']], scores_df, on=['member_id', 'period', 'item_uri', 'formatted_table_title', 'formatted_chart_title', 'subscription_start', 'subscription_end'])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 30,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>member_id</th>\n",
       "      <th>period</th>\n",
       "      <th>item_uri</th>\n",
       "      <th>formatted_table_title</th>\n",
       "      <th>formatted_chart_title</th>\n",
       "      <th>mode_score</th>\n",
       "      <th>mode_zscore</th>\n",
       "      <th>subscription_start</th>\n",
       "      <th>subscription_end</th>\n",
       "      <th>top_score</th>\n",
       "      <th>median</th>\n",
       "      <th>skew</th>\n",
       "      <th>std</th>\n",
       "      <th>var</th>\n",
       "      <th>kurtosis</th>\n",
       "      <th>metric</th>\n",
       "      <th>top_zscore</th>\n",
       "      <th>avg_score</th>\n",
       "      <th>median_score</th>\n",
       "      <th>std_score</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>hemingway-ernest</td>\n",
       "      <td>1921-12-28/1922-11-08</td>\n",
       "      <td>a-e-imaginations-reveries</td>\n",
       "      <td>Imaginations and Reveries by Æ</td>\n",
       "      <td>*Imaginations and Reveries*,&lt;br&gt;Æ</td>\n",
       "      <td>0.024169</td>\n",
       "      <td>-1.111490</td>\n",
       "      <td>1921-12-28</td>\n",
       "      <td>1922-11-08</td>\n",
       "      <td>0.221125</td>\n",
       "      <td>0.166048</td>\n",
       "      <td>-1.177452</td>\n",
       "      <td>0.101616</td>\n",
       "      <td>0.010326</td>\n",
       "      <td>NaN</td>\n",
       "      <td>euclidean</td>\n",
       "      <td>0.826748</td>\n",
       "      <td>0.137114</td>\n",
       "      <td>0.166048</td>\n",
       "      <td>0.101616</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>hemingway-ernest</td>\n",
       "      <td>1921-12-28/1922-11-08</td>\n",
       "      <td>abercrombie-thomas-hardy-critical</td>\n",
       "      <td>Thomas Hardy: A Critical Study by  Lascelles A...</td>\n",
       "      <td>*Thomas Hardy: A Critical Study*,&lt;br&gt; Lascelle...</td>\n",
       "      <td>0.039540</td>\n",
       "      <td>-1.075610</td>\n",
       "      <td>1921-12-28</td>\n",
       "      <td>1922-11-08</td>\n",
       "      <td>0.428571</td>\n",
       "      <td>0.285434</td>\n",
       "      <td>-0.759614</td>\n",
       "      <td>0.196765</td>\n",
       "      <td>0.038716</td>\n",
       "      <td>NaN</td>\n",
       "      <td>euclidean</td>\n",
       "      <td>0.901532</td>\n",
       "      <td>0.251182</td>\n",
       "      <td>0.285434</td>\n",
       "      <td>0.196765</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>hemingway-ernest</td>\n",
       "      <td>1921-12-28/1922-11-08</td>\n",
       "      <td>beerbohm-zuleika-dobson</td>\n",
       "      <td>Zuleika Dobson by  Max Beerbohm</td>\n",
       "      <td>*Zuleika Dobson*,&lt;br&gt; Max Beerbohm</td>\n",
       "      <td>0.026132</td>\n",
       "      <td>-1.097906</td>\n",
       "      <td>1921-12-28</td>\n",
       "      <td>1922-11-08</td>\n",
       "      <td>0.226531</td>\n",
       "      <td>0.163079</td>\n",
       "      <td>-1.014785</td>\n",
       "      <td>0.102421</td>\n",
       "      <td>0.010490</td>\n",
       "      <td>NaN</td>\n",
       "      <td>euclidean</td>\n",
       "      <td>0.858713</td>\n",
       "      <td>0.138580</td>\n",
       "      <td>0.163079</td>\n",
       "      <td>0.102421</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>hemingway-ernest</td>\n",
       "      <td>1921-12-28/1922-11-08</td>\n",
       "      <td>bell-since-cezanne</td>\n",
       "      <td>Since Cézanne by  Clive Bell</td>\n",
       "      <td>*Since Cézanne*,&lt;br&gt; Clive Bell</td>\n",
       "      <td>0.039540</td>\n",
       "      <td>-1.075610</td>\n",
       "      <td>1921-12-28</td>\n",
       "      <td>1922-11-08</td>\n",
       "      <td>0.428571</td>\n",
       "      <td>0.285434</td>\n",
       "      <td>-0.759614</td>\n",
       "      <td>0.196765</td>\n",
       "      <td>0.038716</td>\n",
       "      <td>NaN</td>\n",
       "      <td>euclidean</td>\n",
       "      <td>0.901532</td>\n",
       "      <td>0.251182</td>\n",
       "      <td>0.285434</td>\n",
       "      <td>0.196765</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>hemingway-ernest</td>\n",
       "      <td>1921-12-28/1922-11-08</td>\n",
       "      <td>bennett-married-life</td>\n",
       "      <td>Married Life by  Arnold Bennett</td>\n",
       "      <td>*Married Life*,&lt;br&gt; Arnold Bennett</td>\n",
       "      <td>0.024360</td>\n",
       "      <td>-1.113959</td>\n",
       "      <td>1921-12-28</td>\n",
       "      <td>1922-11-08</td>\n",
       "      <td>0.225564</td>\n",
       "      <td>0.170788</td>\n",
       "      <td>-1.207611</td>\n",
       "      <td>0.104023</td>\n",
       "      <td>0.010821</td>\n",
       "      <td>NaN</td>\n",
       "      <td>euclidean</td>\n",
       "      <td>0.820269</td>\n",
       "      <td>0.140237</td>\n",
       "      <td>0.170788</td>\n",
       "      <td>0.104023</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "          member_id                 period                           item_uri  \\\n",
       "0  hemingway-ernest  1921-12-28/1922-11-08          a-e-imaginations-reveries   \n",
       "1  hemingway-ernest  1921-12-28/1922-11-08  abercrombie-thomas-hardy-critical   \n",
       "2  hemingway-ernest  1921-12-28/1922-11-08            beerbohm-zuleika-dobson   \n",
       "3  hemingway-ernest  1921-12-28/1922-11-08                 bell-since-cezanne   \n",
       "4  hemingway-ernest  1921-12-28/1922-11-08               bennett-married-life   \n",
       "\n",
       "                               formatted_table_title  \\\n",
       "0                     Imaginations and Reveries by Æ   \n",
       "1  Thomas Hardy: A Critical Study by  Lascelles A...   \n",
       "2                    Zuleika Dobson by  Max Beerbohm   \n",
       "3                       Since Cézanne by  Clive Bell   \n",
       "4                    Married Life by  Arnold Bennett   \n",
       "\n",
       "                               formatted_chart_title  mode_score  mode_zscore  \\\n",
       "0                  *Imaginations and Reveries*,<br>Æ    0.024169    -1.111490   \n",
       "1  *Thomas Hardy: A Critical Study*,<br> Lascelle...    0.039540    -1.075610   \n",
       "2                 *Zuleika Dobson*,<br> Max Beerbohm    0.026132    -1.097906   \n",
       "3                    *Since Cézanne*,<br> Clive Bell    0.039540    -1.075610   \n",
       "4                 *Married Life*,<br> Arnold Bennett    0.024360    -1.113959   \n",
       "\n",
       "  subscription_start subscription_end  top_score    median      skew  \\\n",
       "0         1921-12-28       1922-11-08   0.221125  0.166048 -1.177452   \n",
       "1         1921-12-28       1922-11-08   0.428571  0.285434 -0.759614   \n",
       "2         1921-12-28       1922-11-08   0.226531  0.163079 -1.014785   \n",
       "3         1921-12-28       1922-11-08   0.428571  0.285434 -0.759614   \n",
       "4         1921-12-28       1922-11-08   0.225564  0.170788 -1.207611   \n",
       "\n",
       "        std       var  kurtosis     metric  top_zscore  avg_score  \\\n",
       "0  0.101616  0.010326       NaN  euclidean    0.826748   0.137114   \n",
       "1  0.196765  0.038716       NaN  euclidean    0.901532   0.251182   \n",
       "2  0.102421  0.010490       NaN  euclidean    0.858713   0.138580   \n",
       "3  0.196765  0.038716       NaN  euclidean    0.901532   0.251182   \n",
       "4  0.104023  0.010821       NaN  euclidean    0.820269   0.140237   \n",
       "\n",
       "   median_score  std_score  \n",
       "0      0.166048   0.101616  \n",
       "1      0.285434   0.196765  \n",
       "2      0.163079   0.102421  \n",
       "3      0.285434   0.196765  \n",
       "4      0.170788   0.104023  "
      ]
     },
     "execution_count": 30,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "final_scores.head(5)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 34,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Deduping final scores: (480, 20) -> (441, 21)\n"
     ]
    }
   ],
   "source": [
    "# Select the columns for member ID, period, item URI, formatted table and chart titles, and subscription start and end times from 'final_scores'.\n",
    "# Drop duplicate rows to get a DataFrame of unique member subscriptions.\n",
    "member_subscriptions = final_scores[['member_id', 'period', 'item_uri', 'formatted_table_title', 'formatted_chart_title', 'subscription_start', 'subscription_end']].drop_duplicates()\n",
    "\n",
    "# Drop duplicate rows from 'final_scores' to get a DataFrame of unique scores.\n",
    "final_scores_dedup = final_scores.drop_duplicates()\n",
    "\n",
    "# Calculate the coefficient of variation (standard deviation divided by median) for each score in 'final_scores_dedup'.\n",
    "# Add the coefficient of variation to 'final_scores_dedup' as a new column.\n",
    "final_scores_dedup['coef_var'] = (final_scores_dedup.std_score/ final_scores_dedup.median_score)\n",
    "\n",
    "print(f\"Deduping final scores: {final_scores.shape} -> {final_scores_dedup.shape}\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 35,
   "metadata": {},
   "outputs": [],
   "source": [
    "final_scores_dedup.to_csv('./data/collaborative_filtering_predictions.csv', index=False)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "interpreter": {
   "hash": "0fb780361d6b371d92e35df6f1912f5955cee6289dee7ee73aaeea669179a72d"
  },
  "kernelspec": {
   "display_name": "unknown_borrowers_updated_env",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.9.18"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
